/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    position: relative;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input[type="text"],
input[type="password"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

input[type="submit"] {
    background-color: #007bff;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

input[type="submit"]:hover {
    background-color: #0056b3;
}

.message {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #0056b3;
}

/* Profile page specific styles */
.profile-container {
    text-align: center;
}

.logout-btn {
    display: inline-block;
    background-color: #dc3545;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    margin-top: 1rem;
}

.logout-btn:hover {
    background-color: #c82333;
    color: white;
}

/* Error message styling */
.error {
    color: #dc3545;
    text-align: center;
    margin-bottom: 1rem;
}

/* Success message styling */
.success {
    color: #28a745;
    text-align: center;
    margin-bottom: 1rem;
}

/* Add these to your existing styles.css */
.leetcode-stats {
    margin: 2rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.stat-box {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-box h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-box p {
    font-size: 1.2rem;
    color: #007bff;
    font-weight: bold;
}

.leetcode-form {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.leetcode-form h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.leetcode-form form {
    display: flex;
    gap: 0.5rem;
}

.leetcode-form input[type="text"] {
    flex: 1;
}

.leetcode-form input[type="submit"] {
    background-color: #28a745;
}

.leetcode-form input[type="submit"]:hover {
    background-color: #218838;
}

.leetcode-stats h2 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

/* Add these to your existing styles */
.followed-users {
    margin: 2rem 0;
}

.followed-user-stats {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.unfollow-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.unfollow-btn:hover {
    background-color: #c82333;
}

.follow-form {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.follow-form h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.follow-form form {
    display: flex;
    gap: 0.5rem;
}

.follow-form input[type="text"] {
    flex: 1;
}

.no-followed {
    color: #666;
    font-style: italic;
    margin: 1rem 0;
}

/* Add these new styles */
.profile-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
}

.nav-link:hover {
    background-color: #f8f9fa;
    color: #333;
}

.nav-link.active {
    background-color: #007bff;
    color: white;
}

.nav-link.logout {
    margin-left: auto;
    color: #dc3545;
}

.nav-link.logout:hover {
    background-color: #dc3545;
    color: white;
}

.followed-container {
    max-width: 1200px;
}

.followed-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.user-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.user-card:hover {
    transform: translateY(-5px);
}

.user-card-header {
    background-color: #f8f9fa;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-card-header h3 {
    margin: 0;
    color: #333;
}

.user-card-stats {
    padding: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-value {
    font-weight: bold;
    color: #007bff;
}

.stat-value.easy { color: #28a745; }
.stat-value.medium { color: #ffc107; }
.stat-value.hard { color: #dc3545; }

.ranking {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* error message */
.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid #ffcdd2;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
