
        :root {
    /* Gmail-inspired colors */
    --primary: #EA4335;
    --primary-light: #FBBC05;
    --secondary: #34A853;
    --accent: #4285F4;
    --dark: #222326;
    --darker: #171717;
    --light: #FFFFFF;
    --gray: #5F6368;
    --gray-light: #F5F7FA;
    --success: #34A853;
    --danger: #EA4335;
    --warning: #FBBC05;
    --info: #4285F4;
    --border-radius: 16px;
    --box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
    --box-shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --primary: #EA4335;
    --primary-light: #FBBC05;
    --secondary: #34A853;
    --accent: #4285F4;
    --dark: #F5F7FA;
    --darker: #18191A;
    --light: #23272B;
    --gray: #B0B3B8;
    --gray-light: #23272B;
    --success: #34A853;
    --danger: #EA4335;
    --warning: #FBBC05;
    --info: #4285F4;
}



        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Poppins', sans-serif;
            background-color: var(--primary);
            color: var(--dark);
            transition: var(--transition);
            line-height: 1.6;
            height: 100vh;
            overflow: hidden;
        }

        .app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--light);
    color: var(--dark);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
    border-radius: 0;
}

.main-content,
.email-panel,
.viewer-panel,
.email-body,
.settings-panel,
.profile-panel {
    background-color: var(--light);
    color: var(--dark);
}

h1, h2, h3, h4, h5, h6, .email-address, .email-sender, .email-subject, .settings-title, .profile-name {
    color: var(--dark);
}

p, span, label, .email-preview, .email-time, .profile-email, .option-label, .option-value {
    color: var(--gray);
}

        @media (min-width: 768px) {
            .app-container {
                border-radius: var(--border-radius);
                margin: 20px auto;
                height: calc(100vh - 40px);
            }
        }

        /* Header Styles */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 24px;
            background-color: var(--primary);
            color: white;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            z-index: 100;
        }

        .logo {
            display: flex;
            align-items: center;
            font-weight: 700;
            font-size: 24px;
            color: white;
            text-decoration: none;
        }

        .logo span {
            background-color: white;
            color: var(--primary);
            padding: 4px 10px;
            border-radius: 8px;
            margin-right: 8px;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .header-icon {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            cursor: pointer;
            transition: var(--transition);
        }

        .header-icon:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .theme-toggle-btn {
            background: rgba(255, 255, 255, 0.2);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            cursor: pointer;
            transition: var(--transition);
            position: relative;
            overflow: hidden;
        }

        .theme-toggle-btn:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
        }

        .theme-icon {
            font-size: 20px;
            position: absolute;
            transition: var(--transition);
        }

        .sun-icon {
            opacity: 1;
            transform: rotate(0deg) scale(1);
        }

        .moon-icon {
            opacity: 0;
            transform: rotate(-90deg) scale(0.5);
        }

        [data-theme="dark"] .sun-icon {
            opacity: 0;
            transform: rotate(90deg) scale(0.5);
        }

        [data-theme="dark"] .moon-icon {
            opacity: 1;
            transform: rotate(0deg) scale(1);
        }

        /* iPhone-style Notifications */
        .notification-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .notification {
            background: white;
            border-radius: 12px;
            padding: 16px 20px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
            display: flex;
            align-items: center;
            gap: 12px;
            min-width: 300px;
            max-width: 400px;
            animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .notification::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
        }

        .notification.success::before {
            background: var(--success);
        }

        .notification.error::before {
            background: var(--danger);
        }

        .notification.warning::before {
            background: var(--warning);
        }

        .notification.info::before {
            background: var(--info);
        }

        .notification-icon {
            font-size: 24px;
            flex-shrink: 0;
        }

        .notification.success .notification-icon {
            color: var(--success);
        }

        .notification.error .notification-icon {
            color: var(--danger);
        }

        .notification.warning .notification-icon {
            color: var(--warning);
        }

        .notification.info .notification-icon {
            color: var(--info);
        }

        .notification-content {
            flex: 1;
        }

        .notification-title {
            font-weight: 600;
            font-size: 14px;
            margin-bottom: 4px;
            color: var(--dark);
        }

        .notification-message {
            font-size: 13px;
            color: var(--gray);
            line-height: 1.4;
        }

        .notification-close {
            background: none;
            border: none;
            font-size: 18px;
            color: var(--gray);
            cursor: pointer;
            padding: 4px;
            transition: var(--transition-fast);
        }

        .notification-close:hover {
            color: var(--danger);
        }

        @keyframes slideIn {
            from {
                transform: translateX(100%);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        @keyframes slideOut {
            from {
                transform: translateX(0);
                opacity: 1;
            }
            to {
                transform: translateX(100%);
                opacity: 0;
            }
        }

        .notification.slide-out {
            animation: slideOut 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* Samsung-style Animations */
        .samsung-scale {
            animation: samsungScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes samsungScale {
            from {
                transform: scale(0.9);
                opacity: 0;
            }
            to {
                transform: scale(1);
                opacity: 1;
            }
        }

        .samsung-slide-up {
            animation: samsungSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes samsungSlideUp {
            from {
                transform: translateY(20px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .samsung-fade-in {
            animation: samsungFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        @keyframes samsungFadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        /* Enhanced Button Animations */
        .btn {
            position: relative;
            overflow: hidden;
        }

        .btn::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.6s, height 0.6s;
        }

        .btn:active::after {
            width: 300px;
            height: 300px;
        }

        /* Email Item Animations */
        .email-item {
            animation: samsungSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            animation-fill-mode: both;
        }

        .email-item:nth-child(1) { animation-delay: 0.05s; }
        .email-item:nth-child(2) { animation-delay: 0.1s; }
        .email-item:nth-child(3) { animation-delay: 0.15s; }
        .email-item:nth-child(4) { animation-delay: 0.2s; }
        .email-item:nth-child(5) { animation-delay: 0.25s; }
        .email-item:nth-child(6) { animation-delay: 0.3s; }
        .email-item:nth-child(7) { animation-delay: 0.35s; }
        .email-item:nth-child(8) { animation-delay: 0.4s; }

        /* Panel Animations */
        .settings-panel, .profile-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 350px;
    height: 100vh;
    background: var(--light);
    color: var(--dark);
    box-shadow: 0 8px 32px rgba(0,0,0,0.24);
    border-radius: 24px 0 0 24px;
    z-index: 1000;
    padding: 24px;
    overflow-y: auto;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
}
.settings-panel.active, .profile-panel.active {
    right: 0;
    opacity: 1;
    pointer-events: auto;
    animation: panelSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes panelSlideIn {
    from {
        right: -420px;
        opacity: 0;
    }
    to {
        right: 0;
        opacity: 1;
    }
}
@media (max-width: 600px) {
    .settings-panel, .profile-panel {
        width: 100vw;
        border-radius: 0;
    }
}
.panel-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.18);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.panel-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

        /* Loading Spinner */
        .spinner {
            width: 40px;
            height: 40px;
            border: 3px solid var(--gray-light);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        /* Main Content */
        .main-content {
            display: flex;
            flex-direction: column;
            flex: 1;
            overflow: hidden;
        }

        @media (min-width: 992px) {
            .main-content {
                flex-direction: row;
            }
        }

        /* Email List Panel */
        .email-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            border-right: 1px solid var(--gray-light);
            overflow: hidden;
        }

        .email-header {
            padding: 20px;
            border-bottom: 1px solid var(--gray-light);
        }

        .current-email {
            background-color: var(--gray-light);
            padding: 16px;
            border-radius: var(--border-radius);
            margin-bottom: 16px;
        }

        .email-address {
            font-size: 18px;
            font-weight: 600;
            word-break: break-all;
            color: var(--primary);
        }

        .email-actions {
            display: flex;
            gap: 10px;
            margin-top: 12px;
        }

        .btn {
            padding: 10px 16px;
            border-radius: 8px;
            border: none;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: var(--secondary);
            transform: translateY(-2px);
        }

        .btn-secondary {
            background-color: var(--gray-light);
            color: var(--dark);
        }

        .btn-secondary:hover {
            background-color: var(--gray);
            color: white;
        }

        .btn-success {
            background-color: var(--success);
            color: white;
        }

        .email-list-container {
            flex: 1;
            overflow-y: auto;
            padding: 20px;
        }

        .email-list-title {
            font-size: 18px;
            margin-bottom: 16px;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .email-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .email-item {
            background-color: white;
            border-radius: var(--border-radius);
            padding: 16px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
            cursor: pointer;
            transition: var(--transition);
            border-left: 4px solid transparent;
        }

        .email-item:hover {
            transform: translateX(4px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
        }

        .email-item.active {
            border-left-color: var(--primary);
            background-color: var(--gray-light);
        }

        .email-sender {
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 4px;
        }

        .email-subject {
            font-weight: 500;
            color: var(--dark);
            margin-bottom: 4px;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .email-preview {
            font-size: 14px;
            color: var(--gray);
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 8px;
        }

        .email-time {
            font-size: 12px;
            color: var(--gray);
            text-align: right;
        }

        .empty-state {
            text-align: center;
            padding: 40px 20px;
            color: var(--gray);
        }

        .empty-icon {
            font-size: 48px;
            margin-bottom: 16px;
            color: var(--gray-light);
        }

        /* Email Viewer Panel */
        .viewer-panel {
            flex: 1.5;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background-color: var(--gray-light);
        }

        .viewer-header {
            padding: 20px;
            border-bottom: 1px solid var(--gray-light);
            background-color: white;
        }

        .viewer-subject {
            font-size: 22px;
            font-weight: 600;
            margin-bottom: 8px;
            color: var(--dark);
        }

        .viewer-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: var(--gray);
            font-size: 14px;
        }

        .email-body {
            flex: 1;
            padding: 24px;
            overflow-y: auto;
            background-color: white;
            line-height: 1.8;
        }

        .no-email-selected {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100%;
            padding: 40px;
            text-align: center;
            color: var(--gray);
        }

        .no-email-icon {
            font-size: 64px;
            margin-bottom: 20px;
            color: var(--gray-light);
        }

        /* Loading and Status */
        .loading {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100%;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid var(--gray-light);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .status-message {
            padding: 12px 16px;
            border-radius: var(--border-radius);
            margin: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            animation: fadeIn 0.5s ease;
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .status-success {
            background-color: rgba(76, 201, 240, 0.2);
            color: var(--success);
            border-left: 4px solid var(--success);
        }

        .status-error {
            background-color: rgba(247, 37, 133, 0.2);
            color: var(--danger);
            border-left: 4px solid var(--danger);
        }

        .close-status {
            background: none;
            border: none;
            color: inherit;
            cursor: pointer;
            font-size: 18px;
        }

        /* Responsive adjustments */
        @media (max-width: 991px) {
            .email-panel, .viewer-panel {
                width: 100%;
            }
            
            .viewer-panel {
                display: none;
            }
            
            .viewer-panel.active {
                display: flex;
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                z-index: 200;
                background-color: var(--light);
            }
            
            .back-button {
                display: flex;
                align-items: center;
                gap: 6px;
                background: none;
                border: none;
                color: var(--primary);
                font-weight: 500;
                font-size: 17px;
                cursor: pointer;
                margin-bottom: 16px;
                padding: 8px 12px;
                border-radius: 8px;
                transition: var(--transition);
                position: relative;
                overflow: hidden;
            }

            .back-button:hover {
                background-color: rgba(0, 122, 255, 0.1);
                transform: translateX(-2px);
            }

            .back-button:active {
                transform: scale(0.95);
            }

            .back-button i {
                font-size: 18px;
                font-weight: 600;
                transition: var(--transition);
            }

            .back-button:active i {
                transform: translateX(-4px);
            }

            @keyframes backClick {
                0% { transform: scale(1); }
                50% { transform: scale(0.92); }
                100% { transform: scale(1); }
            }

            .back-button.clicked {
                animation: backClick 0.2s ease;
            }
        }

        @media (min-width: 992px) {
            .back-button {
                display: none;
            }
        }

        /* Settings Panel */
        .settings-panel {
            position: absolute;
            top: 0;
            right: -400px;
            width: 350px;
            height: 100%;
            background-color: var(--light);
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            z-index: 300;
            padding: 24px;
            transition: var(--transition);
            overflow-y: auto;
        }

        .settings-panel.active {
            right: 0;
        }

        .settings-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
        }

        .settings-title {
            font-size: 22px;
            font-weight: 600;
            color: var(--dark);
        }

        .close-settings {
            background: none;
            border: none;
            font-size: 20px;
            color: var(--gray);
            cursor: pointer;
        }

        .settings-section {
            margin-bottom: 28px;
        }

        .settings-section-title {
            font-size: 16px;
            font-weight: 600;
            margin-bottom: 12px;
            color: var(--dark);
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .settings-option {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid var(--gray-light);
        }

        .option-label {
            font-weight: 500;
            color: var(--dark);
        }

        .option-value {
            color: var(--gray);
        }

        /* Profile Panel */
        .profile-panel {
            position: absolute;
            top: 0;
            right: -400px;
            width: 350px;
            height: 100%;
            background-color: var(--light);
            box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
            z-index: 300;
            padding: 24px;
            transition: var(--transition);
            overflow-y: auto;
        }

        .profile-panel.active {
            right: 0;
        }

        .profile-header {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin-bottom: 24px;
            text-align: center;
        }

        .profile-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background-color: var(--primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 32px;
            color: white;
            margin-bottom: 16px;
        }

        .profile-name {
            font-size: 22px;
            font-weight: 600;
            color: var(--dark);
        }

        .profile-email {
            color: var(--gray);
            font-size: 14px;
            margin-top: 4px;
        }

        /* Footer */
        footer {
            padding: 16px 24px;
            text-align: center;
            background-color: var(--gray-light);
            color: var(--gray);
            font-size: 14px;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 20px;
            margin-top: 8px;
        }

        .footer-link {
            color: var(--primary);
            text-decoration: none;
            transition: var(--transition);
        }

        .footer-link:hover {
            color: var(--secondary);
            text-decoration: underline;
        }
