* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    overflow-x: hidden;
}

.main-app {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Header Styles */
.app-header {
    background: linear-gradient(135deg, #4f7cff 0%, #7c3aed 100%);
    padding: 16px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-btn, .hamburger {
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.menu-btn:hover { transform: scale(1.1); }

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.logo-section h1 {
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.welcome-text {
    font-size: 14px;
    font-weight: 500;
}

.upgrade-btn {
    background: linear-gradient(90deg, #ff8a00 0%, #ff3d00 100%);
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.15s ease;
}

.upgrade-btn:hover {
    transform: translateY(-2px);
}

/* Main Content */
.app-main {
    padding: 40px 0;
    position: relative;
}

/* Sidebar */
.app-sidebar {
    width: 220px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100vh - 160px);
    transition: transform 0.25s ease;
    position: fixed;
    left: 32px;
    top: 96px;
    z-index: 10;
}

.app-sidebar.closed {
    transform: translateX(-120%);
    opacity: 0;
}

.sidebar-top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
}

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 20px;
}

.sidebar-name {
    font-weight: 700;
    color: #0f172a;
    font-size: 13px;
}

.sidebar-email {
    font-size: 12px;
    color: #6b7280;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-item {
    text-align: left;
    padding: 10px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
}

.sidebar-item:hover {
    background: #f3f4f6;
}

.sidebar-item.active {
    background: linear-gradient(90deg, #eef2ff, #f8f6ff);
    border-left: 3px solid #667eea;
    padding-left: 10px;
    color: #667eea;
}

.sidebar-logout {
    background: #ff4d00;
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Profile Section */
.profile-section {
    background: white;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 32px;
    animation: slideUp 0.6s ease-out;
    position: relative;
}

@keyframes slideUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f3f4f6;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 42px;
    box-shadow: 0 8px 24px rgba(103, 126, 234, 0.3);
}

.profile-header-info h2 {
    font-size: 28px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.profile-header-info p {
    color: #6b7280;
    font-size: 15px;
}

.profile-plan-badge {
    display: inline-block;
    background: linear-gradient(90deg, #ff8a00 0%, #ff3d00 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.profile-field {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.profile-field:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

.profile-field-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.profile-field-value {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 500;
}

.profile-field-empty {
    color: #9ca3af;
    font-style: italic;
}

.profile-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f3f4f6;
}

.btn-edit, .btn-change-password {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-edit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(103, 126, 234, 0.4);
}

.btn-change-password {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-change-password:hover {
    background: #f3f4f6;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .profile-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
    }

    .profile-actions {
        flex-direction: column;
    }

    .app-sidebar {
        left: 16px;
        width: 260px;
    }

    .hamburger {
        display: block !important;
    }

    .menu-btn {
        display: none;
    }

    .welcome-text {
        display: none;
    }
}