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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

header h1 {
    color: #5a67d8;
    font-size: 2rem;
    margin: 0;
}

/* Logout Button */
.logout-button {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 10px rgba(252, 129, 129, 0.3);
}

.logout-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(252, 129, 129, 0.4);
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.logout-button:active {
    transform: translateY(0);
}

.logout-icon {
    font-size: 1.1rem;
}

/* User Information Display */
.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(90, 103, 216, 0.1);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.user-info:hover {
    background: rgba(90, 103, 216, 0.15);
    border-color: rgba(90, 103, 216, 0.3);
    transform: translateY(-1px);
}

.user-avatar {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    font-weight: bold;
}

.user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-email {
    font-size: 0.75rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: #5a67d8;
    color: white;
    transform: translateY(-2px);
}

/* Main content */
main {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

section h2 {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Dashboard */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.card h3 {
    color: #5a67d8;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.card ul {
    list-style: none;
}

.card li {
    padding: 0.5rem 0;
    color: #4a5568;
    border-bottom: 1px solid #f7fafc;
}

.card li:last-child {
    border-bottom: none;
}

/* Family members */
.family-members {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.member {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    font-weight: 500;
    transition: transform 0.3s ease;
}

.member:hover {
    transform: scale(1.05);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

/* Responsive design */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .user-section {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        align-items: center;
    }
    
    .user-info {
        padding: 0.5rem 0.75rem;
        max-width: 280px;
        width: 100%;
        justify-content: center;
    }
    
    .user-name {
        max-width: 120px;
        font-size: 0.85rem;
    }
    
    .user-email {
        max-width: 120px;
        font-size: 0.7rem;
    }
    
    .user-avatar {
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .logout-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .family-members {
        grid-template-columns: 1fr;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.6s ease forwards;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }