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

:root {
    --primary: #2F3E46;
    --secondary: #354F52;
    --accent: #52796F;
    --highlight: #84A98C;
    --background: #CAD2C5;
    --white: #FFFFFF;
    --off-white: #FAFBFC;
    --gray-light: #F8F9FA;
    --gray: #E8EAED;
    --gray-medium: #D1D5DB;
    --text: #1F2937;
    --text-light: #6B7280;
    --text-lighter: #9CA3AF;
    --border: #E5E7EB;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--off-white);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--off-white);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-medium);
    border-radius: 6px;
    border: 3px solid var(--off-white);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

#app {
    height: 100vh;
    overflow: hidden;
}

.screen {
    display: none;
    height: 100%;
}

.screen.active {
    display: flex;
}

/* Login Screen */
#login-screen {
    flex-direction: column;
    background: var(--white);
    overflow-y: auto;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
}

/* Hero Section - 100vh */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    height: 100vh;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-section .login-left,
.hero-section .login-container {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s, transform 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
}

.hero-section.active .login-left,
.hero-section:first-child .login-left {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.hero-section.active .login-container,
.hero-section:first-child .login-container {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.login-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    background: var(--off-white);
    border-right: 1px solid var(--border);
}

.login-left .logo {
    margin-bottom: 3rem;
}

.doodle-container {
    width: 100%;
    max-width: 600px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.doodle-container svg {
    width: 100%;
    height: auto;
}

.login-header {
    display: none;
}

.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 4rem;
    background: var(--white);
    max-width: 540px;
    width: 100%;
    margin: 0 auto;
}

.login-title {
    font-size: 2.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-animation-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-animation-container video {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes logoFadeOut {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.85);
    }
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes envelopeSequence {
    0% {
        opacity: 0;
        transform: scale(0.7) translateY(20px);
    }
    15% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    70% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    85% {
        opacity: 0.5;
        transform: scale(0.9) translateY(-10px);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
}

@keyframes planeFly {
    0% {
        opacity: 0;
        transform: translate(140px, 110px) rotate(0deg) scale(1);
    }
    10% {
        opacity: 1;
        transform: translate(150px, 105px) rotate(-5deg) scale(1.1);
    }
    40% {
        opacity: 1;
        transform: translate(280px, 40px) rotate(-35deg) scale(1.3);
    }
    70% {
        opacity: 0.8;
        transform: translate(420px, -30px) rotate(-45deg) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(550px, -80px) rotate(-50deg) scale(0.8);
    }
}

@media (max-width: 968px) {
    .hero-section {
        grid-template-columns: 1fr;
        height: 100vh;
        min-height: 100vh;
    }
    
    #login-screen.active {
        display: block;
    }
    
    .login-left {
        padding: 1.5rem 1.5rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    
    .login-left .logo {
        margin-bottom: 1rem;
        font-size: 2.25rem;
    }
    
    .doodle-container {
        max-width: 320px;
    }
    
    .logo-animation-container {
        max-width: 280px;
    }
    
    .login-container {
        padding: 1.5rem 1.5rem 2rem;
    }
    
    .login-title {
        font-size: 1.375rem;
        margin-bottom: 0.5rem;
    }
    
    .tagline {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .btn-primary {
        padding: 12px 28px;
        font-size: 0.8125rem;
    }
    
    .hero-section .features {
        display: none !important;
    }
    
    .features {
        margin-top: 2rem;
        gap: 1rem;
    }
    
    .feature-item {
        gap: 0.75rem;
    }
    
    .feature-item svg {
        width: 18px;
        height: 18px;
    }
    
    .feature-item h3 {
        font-size: 0.8125rem;
        margin-bottom: 0.125rem;
    }
    
    .feature-item p {
        font-size: 0.75rem;
    }
    
    .additional-sections {
        padding: 0;
    }
    
    .how-it-works {
        padding: 0.75rem 1.25rem;
        min-height: 100vh;
        height: 100vh;
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    
    .stats-section {
        padding: 0.5rem 1.25rem;
        min-height: 100vh;
        height: 100vh;
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    
    .features-section {
        padding: 0.5rem 1.25rem;
        min-height: 100vh;
        height: 100vh;
        display: flex;
        align-items: center;
        overflow: hidden;
    }
    
    .stats-section .section-content {
        padding: 0;
    }
    
    .section-content {
        display: block !important;
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .section-visual {
        display: none !important;
    }
    
    .section-text {
        gap: 0.25rem;
        order: 1;
        text-align: left;
        width: 100%;
    }
    
    .section-title {
        font-size: 1.125rem;
        line-height: 1.2;
        margin-bottom: 0.25rem;
    }
    
    .section-description {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 0.375rem;
    }
    
    .steps {
        gap: 0.625rem;
        margin-top: 0.5rem;
    }
    
    .how-it-works .step:last-child {
        display: flex;
    }
    
    .step {
        gap: 0.625rem;
    }
    
    .step-number {
        align-self: flex-start;
        width: 20px;
        height: 20px;
        font-size: 0.625rem;
        flex-shrink: 0;
    }
    
    .step h4 {
        font-size: 0.875rem;
        margin-bottom: 0;
        line-height: 1.2;
    }
    
    .step p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .benefits {
        gap: 0.625rem;
        margin-top: 0.5rem;
    }
    
    .stats-section .benefit-item:last-child {
        display: flex;
    }
    
    .benefit-item {
        gap: 0.625rem;
    }
    
    .benefit-item svg {
        align-self: flex-start;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .benefit-item h4 {
        font-size: 0.875rem;
        margin-bottom: 0;
        line-height: 1.2;
    }
    
    .benefit-item p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .features-list {
        gap: 0.625rem;
        margin-top: 0.5rem;
    }
    
    .features-section .feature-list-item:nth-child(3),
    .features-section .feature-list-item:nth-child(4) {
        display: flex;
    }
    
    .feature-list-item {
        gap: 0.625rem;
    }
    
    .feature-list-item svg {
        align-self: flex-start;
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
    
    .feature-list-item h4 {
        font-size: 0.875rem;
        margin-bottom: 0;
        line-height: 1.2;
    }
    
    .feature-list-item p {
        font-size: 0.75rem;
        line-height: 1.3;
    }
    
    .cta-section {
        padding: 1.5rem 1.5rem;
        min-height: 100vh;
        height: 100vh;
    }
    
    .cta-title {
        font-size: 1.375rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .cta-description {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .btn-cta {
        padding: 12px 28px;
        font-size: 0.8125rem;
    }
    
    .cta-note {
        margin-top: 0.875rem;
        font-size: 0.6875rem;
    }
    
    .footer {
        padding: 1.5rem 1.5rem 1rem;
        min-height: auto;
    }
    
    .footer-main {
        display: block !important;
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .footer-brand {
        text-align: center;
        margin-bottom: 2rem;
    }
    
    .footer-brand .logo-small {
        font-size: 1.25rem;
    }
    
    .footer-tagline {
        font-size: 0.8125rem;
    }
    
    .footer-links {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 2rem 1.5rem;
        text-align: center;
    }
    
    .footer-column {
        text-align: center;
    }
    
    .footer-column h4 {
        font-size: 0.8125rem;
        margin-bottom: 0.375rem;
    }
    
    .footer-column a {
        font-size: 0.8125rem;
    }
    
    .footer-bottom {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
        text-align: center;
        padding-top: 1rem;
    }
    
    .footer-bottom p {
        font-size: 0.75rem;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-social a {
        width: 32px;
        height: 32px;
    }
    
    .footer-social svg {
        width: 18px;
        height: 18px;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
    
    /* Main App Responsive */
    #main-screen.active {
        grid-template-columns: 1fr !important;
        height: 100vh;
    }
    
    .sidebar {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        display: flex;
    }
    
    .sidebar.mobile-open {
        left: 0;
    }
    
    .main-content {
        width: 100%;
        grid-column: 1;
    }
    
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .mobile-overlay.active {
        display: block;
    }
    
    .mobile-menu-btn {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 4px;
        position: fixed;
        top: 1rem;
        left: 1rem;
        width: 40px;
        height: 40px;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        z-index: 998;
        transition: all 0.3s ease;
        padding: 10px 8px;
    }
    
    .mobile-menu-btn:hover {
        background: var(--gray-light);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .mobile-menu-btn .line-short {
        width: 16px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-btn .line-long {
        width: 24px;
        height: 2px;
        background: var(--text);
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .sidebar.mobile-open ~ .mobile-menu-btn .line-short {
        transform: rotate(45deg) translate(5px, 5px);
        width: 24px;
    }
    
    .sidebar.mobile-open ~ .mobile-menu-btn .line-long {
        transform: rotate(-45deg) translate(1px, -1px);
    }
    
    .search-container {
        padding: 0.75rem 1rem 0.5rem;
        padding-left: 68px !important;
    }
    

    
    .priority-tabs-wrapper {
        border-bottom: none;
    }
    
    .priority-tabs {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        overflow-x: visible;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 1px solid var(--border);
    }
    
    .priority-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab-hidden {
        display: none !important;
    }
    
    .tab-more {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    
    .tab[data-priority="later"]:not(.tab-hidden) {
        display: inline-flex !important;
    }
    
    .more-tabs-dropdown {
        right: 1rem;
        left: auto;
        width: auto;
        min-width: 200px;
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .tab {
        padding: 6px 12px;
        font-size: 0.75rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .tab svg {
        width: 6px;
        height: 6px;
    }
    
    .email-list {
        padding: 0.75rem;
    }
    
    .email-list-container {
        border-radius: 8px;
    }
    
    .email-item {
        grid-template-columns: auto 1fr;
        gap: 0.25rem;
        padding: 0.25rem 0.5rem;
    }
    
    .email-info {
        min-width: 0;
        max-width: 100%;
    }
    
    .email-time {
        grid-column: 2;
        justify-self: end;
        font-size: 0.5625rem;
        margin-top: 0;
    }
    
    .avatar-small {
        width: 16px;
        height: 16px;
    }
    
    .email-sender {
        font-size: 0.625rem;
        margin-bottom: 0;
        line-height: 1;
    }
    
    .email-subject {
        font-size: 0.625rem;
        margin-bottom: 0;
        line-height: 1;
    }
    
    .email-preview {
        font-size: 0.5625rem;
        -webkit-line-clamp: 1;
        max-height: 1em;
        line-height: 1;
        word-break: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }
    
    .email-view {
        padding: 1.5rem 1rem;
    }
    
    #email-subject {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .email-meta {
        padding: 1rem 1.25rem;
        gap: 12px;
    }
    
    .sender-name {
        font-size: 0.875rem;
    }
    
    .sender-email {
        font-size: 0.75rem;
    }
    
    .email-date {
        font-size: 0.75rem;
    }
    
    .email-body {
        padding: 2rem 0;
        font-size: 0.9375rem;
    }
    
    .loading-bar {
        left: 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-header h3 {
        font-size: 1.125rem;
    }
    
    #compose-form {
        padding: 1.5rem;
    }
    
    #compose-form input,
    #compose-form textarea {
        padding: 12px 14px;
        font-size: 0.875rem;
    }
}

.logo-priora {
    color: var(--primary);
}

.logo-mail {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.tagline {
    font-size: 1.125rem;
    color: var(--text-lighter);
    margin-bottom: 3rem;
    font-weight: 400;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 40px;
    background: linear-gradient(135deg, #2F3E46 0%, #354F52 50%, #52796F 100%);
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.3) inset,
        0 -1px 2px rgba(0, 0, 0, 0.3) inset,
        0 10px 30px rgba(47, 62, 70, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 1px 3px rgba(255, 255, 255, 0.4) inset,
        0 -1px 3px rgba(0, 0, 0, 0.2) inset,
        0 20px 50px rgba(47, 62, 70, 0.4),
        0 5px 15px rgba(82, 121, 111, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(-1px) scale(1);
    transition: all 0.1s ease;
    box-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.3) inset,
        0 -1px 2px rgba(0, 0, 0, 0.3) inset,
        0 5px 20px rgba(47, 62, 70, 0.3);
}

.features {
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: left;
}

.feature-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.feature-item svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.feature-item h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    letter-spacing: -0.25px;
}

.feature-item p {
    font-size: 0.875rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Additional Sections Below Hero */
.additional-sections {
    width: 100%;
    background: var(--white);
    border-top: 1px solid var(--border);
}

/* How It Works Section */
.how-it-works {
    min-height: 100vh;
    padding: 6rem 4rem;
    background: transparent;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-it-works .section-text,
.how-it-works .section-visual {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-it-works .section-visual {
    transform: translateX(50px);
}

.how-it-works.active .section-text {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.how-it-works.active .section-visual {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.how-it-works .step {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.how-it-works.active .step:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.how-it-works.active .step:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.7s;
}

.how-it-works.active .step:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.9s;
}

.section-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
    align-items: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.section-text {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.section-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.section-visual svg {
    width: 100%;
    max-width: 500px;
    height: auto;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.section-description {
    font-size: 1.0625rem;
    color: var(--text-light);
    line-height: 1.7;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.25px;
}

.step p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Stats Section */
.stats-section {
    min-height: 100vh;
    padding: 6rem 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-section .section-visual,
.stats-section .section-text {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-section .section-text {
    transform: translateX(-50px);
}

.stats-section.active .section-visual {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.3s;
}

.stats-section.active .section-text {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.stats-section .benefit-item {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stats-section.active .benefit-item:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.6s;
}

.stats-section.active .benefit-item:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.8s;
}

.stats-section.active .benefit-item:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1s;
}

.stats-section .section-content {
    padding: 0 4rem;
}

/* Features Section */
.features-section {
    min-height: 100vh;
    padding: 6rem 4rem;
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-bottom: 1px solid var(--border);
    position: relative;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.features-section .section-text,
.features-section .section-visual {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.features-section.active .section-text {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.features-section.active .section-visual {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.features-section .feature-list-item {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.features-section.active .feature-list-item:nth-child(1) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.5s;
}

.features-section.active .feature-list-item:nth-child(2) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.7s;
}

.features-section.active .feature-list-item:nth-child(3) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 0.9s;
}

.features-section.active .feature-list-item:nth-child(4) {
    opacity: 1;
    transform: translateX(0);
    transition-delay: 1.1s;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-list-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.feature-list-item svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.feature-list-item h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.25px;
}

.feature-list-item p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* CTA Section */
.cta-section {
    min-height: 100vh;
    padding: 6rem 4rem;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-section .cta-content {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-section.active .cta-content {
    opacity: 1;
    transform: scale(1);
    transition-delay: 0.3s;
}

.cta-content {
    max-width: 700px;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

.cta-description {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.btn-cta {
    padding: 18px 48px;
    font-size: 1rem;
    border-radius: 18px;
}

.cta-note {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-lighter);
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 4rem 4rem 2rem;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer .footer-main,
.footer .footer-bottom {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer.active .footer-main {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.footer.active .footer-bottom {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--text-light);
    font-weight: 500;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.25px;
}

.footer-column a {
    font-size: 0.875rem;
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.footer-column a:hover {
    color: var(--accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-lighter);
    font-weight: 500;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-light);
    transition: all 0.2s;
}

.footer-social a:hover {
    background: var(--gray-light);
    color: var(--accent);
}

.benefits {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.benefit-item {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.benefit-item svg {
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.benefit-item h4 {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.25px;
}

.benefit-item p {
    font-size: 0.9375rem;
    color: var(--text-light);
    line-height: 1.6;
}

.stats {
    padding: 3rem;
    background: var(--off-white);
    border-radius: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.mobile-menu-btn {
    display: none;
}

.mobile-menu-spacer {
    display: none;
}

.mobile-overlay {
    display: none;
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 48px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.25px;
}

.btn-google:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

/* Main Screen */
#main-screen.active {
    display: grid;
    grid-template-columns: 260px 1fr;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background: var(--white);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-right: 1px solid var(--border);
    height: 100vh;
    overflow-y: auto;
}

.logo-small {
    font-family: 'Playfair Display', serif;
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.25px;
    margin-bottom: 0.5rem;
    padding: 0 0.5rem;
}

.logo-small .logo-priora {
    color: var(--primary);
}

.logo-small .logo-mail {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: 0.5px;
}

.btn-compose {
    padding: 14px 20px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(82, 121, 111, 0.2);
    letter-spacing: 0.25px;
    width: 100%;
}

.btn-compose:hover {
    background: var(--highlight);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(82, 121, 111, 0.3);
}

/* Search Bar */
.search-container {
    position: relative;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 1.5rem 0.5rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

/* AI Categorize Button */
.ai-categorize-container {
    display: flex;
    justify-content: center;
    padding: 0.5rem 1.5rem 1rem;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.btn-ai-categorize {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(82, 121, 111, 0.3);
}

.btn-ai-categorize:hover {
    background: var(--highlight);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(82, 121, 111, 0.4);
}

.btn-ai-categorize:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.search-container > div {
    position: relative;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-lighter);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: 1px solid var(--border);
    border-radius: 24px;
    font-size: 0.875rem;
    color: var(--text);
    background: var(--gray-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.search-input::placeholder {
    color: var(--text-lighter);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--white);
    box-shadow: 0 2px 8px rgba(82, 121, 111, 0.12);
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    font-size: 0.875rem;
    position: relative;
    margin-right: 0;
}

.nav-item::before {
    display: none;
}

.nav-item:hover {
    background: var(--gray-light);
    color: var(--text);
    padding-left: 12px;
}

.nav-item.active {
    background: rgba(82, 121, 111, 0.12);
    color: var(--accent);
    font-weight: 600;
    padding-left: 12px;
}

.nav-item.active::before {
    display: none;
}

.nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.75rem 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-logout {
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
}

.btn-logout:hover {
    background: var(--gray-light);
    color: var(--text);
    border-color: var(--gray-medium);
}

.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border);
}

.avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-email {
    font-size: 0.75rem;
    color: var(--text-lighter);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

/* Main Content */
.main-content {
    background: var(--white);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

/* Priority Tabs */
.priority-tabs-wrapper {
    position: relative;
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.priority-tabs,
.ai-priority-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: transparent;
    border-bottom: none;
    min-height: auto;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: wrap;
}

.tab-hidden {
    display: none;
}

.tab-more {
    display: none;
}

.tab[data-priority="later"]:not(.tab-hidden) {
    display: none;
}

@media (min-width: 969px) {
    .tab-more {
        display: none !important;
    }
}

.more-tabs-dropdown {
    position: absolute;
    top: 100%;
    right: 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 100;
    min-width: 180px;
    margin-top: 0.5rem;
}

.more-tabs-dropdown.hidden {
    display: none;
}

.dropdown-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    width: 100%;
}

.dropdown-tab:hover {
    background: var(--gray-light);
    color: var(--text);
}

.dropdown-tab svg {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    align-self: center;
}

.dropdown-tab[data-priority="later"] svg {
    color: #F59E0B;
}

.dropdown-tab[data-priority="verification"] svg {
    color: #3B82F6;
}

.dropdown-tab[data-priority="receipts"] svg {
    color: #10B981;
}

.dropdown-tab[data-priority="newsletters"] svg {
    color: #8B5CF6;
}

.dropdown-tab[data-priority="promotions"] svg {
    color: #EC4899;
}

.dropdown-tab[data-priority="social"] svg {
    color: #06B6D4;
}

.dropdown-tab[data-priority="updates"] svg {
    color: #6366F1;
}

.dropdown-tab[data-priority="spam"] svg {
    color: #9CA3AF;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    height: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.tab svg {
    width: 8px;
    height: 8px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
    color: var(--text);
    background: var(--gray-light);
    border-color: var(--gray-medium);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tab:hover svg {
    transform: scale(1.1);
}

.tab.active {
    color: var(--white);
    background: var(--accent);
    border-color: var(--accent);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(82, 121, 111, 0.3);
}

.tab.active svg {
    color: var(--white);
}

.tab[data-priority="all"] svg {
    color: #6B7280;
}

.tab[data-priority="latest"] svg {
    color: #10B981;
}

.tab[data-priority="later"] svg {
    color: #F59E0B;
}

.tab[data-priority="focus"] svg {
    color: #EF4444;
}

.tab[data-priority="verification"] svg {
    color: #3B82F6;
}

.tab[data-priority="receipts"] svg {
    color: #10B981;
}

.tab[data-priority="newsletters"] svg {
    color: #8B5CF6;
}

.tab[data-priority="promotions"] svg {
    color: #EC4899;
}

.tab[data-priority="social"] svg {
    color: #06B6D4;
}

.tab[data-priority="updates"] svg {
    color: #6366F1;
}

.tab[data-priority="spam"] svg {
    color: #9CA3AF;
}

/* Email List */
.email-list {
    padding: 1.5rem;
    max-width: 100%;
    flex: 1;
    overflow-y: auto;
    background: var(--off-white);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--white);
    border-top: 1px solid var(--border);
}

.pagination-btn {
    padding: 10px 20px;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-btn:hover:not(:disabled) {
    background: var(--highlight);
    transform: translateY(-1px);
}

.pagination-btn:disabled {
    background: var(--gray-medium);
    cursor: not-allowed;
    opacity: 0.5;
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.email-list-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
}

.email-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--white);
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    margin-bottom: 0;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    align-items: start;
}

.email-item:last-child {
    border-bottom: none;
}

.email-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent);
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.email-item:hover {
    background: var(--gray-light);
    box-shadow: none;
    transform: none;
}

.email-item:hover::before {
    transform: scaleY(1);
}

.email-item.unread {
    background: var(--white);
    border-bottom-color: var(--border);
}

.email-item.unread::before {
    transform: scaleY(0);
}

.email-item.unread:hover::before {
    transform: scaleY(1);
}

.email-item.unread .email-sender,
.email-item.unread .email-subject {
    font-weight: 700;
    color: var(--text);
}

.email-sender {
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
    letter-spacing: 0;
}

.email-subject {
    color: var(--text);
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0;
}

.email-preview {
    font-size: 0.8125rem;
    color: var(--text-light);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    font-weight: 400;
    max-height: 2.8em;
}

.email-time {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    font-weight: 400;
    padding: 0;
    background: transparent;
    border-radius: 0;
    align-self: flex-start;
}

/* Email View */
.email-view {
    padding: 3rem 4rem 4rem;
    max-width: 900px;
    background: var(--white);
    min-height: 100vh;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.email-view.hidden {
    display: none;
}

.btn-back {
    padding: 12px 20px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 2.5rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-back:hover {
    background: var(--gray-light);
    color: var(--accent);
    border-color: var(--accent);
    transform: translateX(-4px);
}

.email-header {
    margin-bottom: 3rem;
}

.email-view.no-body-content .email-header {
    margin-bottom: 0.5rem !important;
}

.email-view.no-body-content .email-meta {
    margin-bottom: 0 !important;
}

#email-subject {
    font-size: 1.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2rem;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.email-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(250, 251, 252, 1) 0%, rgba(255, 255, 255, 1) 100%);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.sender-name {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9375rem;
}

.sender-email {
    font-size: 0.8125rem;
    color: var(--text-lighter);
    margin-top: 2px;
}

.email-date {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-lighter);
    font-weight: 500;
}

.email-body {
    padding: 3rem 0;
    line-height: 1.8;
    color: var(--text);
    font-size: 1rem;
    white-space: pre-wrap;
    letter-spacing: -0.15px;
    max-width: 100%;
    overflow-x: auto;
    word-wrap: break-word;
}

.email-body.no-body-content {
    padding: 0 !important;
}

.email-body.no-body-content {
    padding: 0;
}

.email-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

.email-body table {
    max-width: 100%;
    border-collapse: collapse;
}

.email-body a {
    color: var(--accent);
    word-break: break-all;
}

/* Compose Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeInModal 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    width: 95%;
    height: 90vh;
    max-width: 1200px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.08);
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-bottom: 1.5px solid var(--border);
    background: linear-gradient(180deg, rgba(250, 251, 252, 0.5) 0%, rgba(255, 255, 255, 1) 100%);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.5px;
}

.btn-close {
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--text-lighter);
    cursor: pointer;
    line-height: 1;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.btn-close:hover {
    color: var(--text);
    background: var(--gray-light);
    transform: rotate(90deg);
}

#compose-form {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    flex: 1;
    overflow-y: auto;
}

#compose-form input,
#compose-form textarea {
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
}

#compose-form input:focus,
#compose-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(82, 121, 111, 0.1), 0 2px 8px rgba(82, 121, 111, 0.08);
    transform: translateY(-1px);
}

#compose-form input::placeholder,
#compose-form textarea::placeholder {
    color: var(--text-lighter);
}

#compose-form textarea {
    resize: vertical;
    line-height: 1.6;
}

.compose-options {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.email-input-group {
    margin-bottom: 1rem;
}

.email-input-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.email-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.email-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.email-input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    color: var(--text);
    transition: all 0.25s;
    background: var(--white);
}

.email-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(82, 121, 111, 0.1);
}

.btn-add-email {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-add-email:hover {
    background: var(--highlight);
    transform: scale(1.05);
}

.btn-remove-email {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-lighter);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-remove-email:hover {
    background: var(--gray-light);
    color: var(--text);
    border-color: var(--gray-medium);
}

.btn-option {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-option:hover {
    background: var(--gray-light);
    color: var(--text);
}

.compose-toolbar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.toolbar-btn:hover {
    background: var(--white);
    color: var(--accent);
}

.toolbar-btn.active {
    background: var(--accent);
    color: var(--white);
}

.toolbar-btn input[type="file"] {
    display: none;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 0.25rem;
}

.compose-editor {
    min-height: 300px;
    max-height: none;
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    outline: none;
    transition: all 0.25s;
}

.compose-editor:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(82, 121, 111, 0.1);
}

.compose-editor:empty:before {
    content: attr(placeholder);
    color: var(--text-lighter);
    pointer-events: none;
}

.compose-editor img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 0.5rem 0;
}

.attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: var(--text);
}

.attachment-item svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
}

.attachment-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--text-lighter);
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    margin-left: 0.25rem;
}

.attachment-remove:hover {
    background: var(--white);
    color: var(--text);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.modal-actions .btn-primary {
    flex: 0 0 auto;
    padding: 14px 32px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(82, 121, 111, 0.2);
}

.modal-actions .btn-primary:hover {
    box-shadow: 0 8px 24px rgba(82, 121, 111, 0.3);
}

.modal-actions .btn-secondary {
    flex: 0 0 auto;
    padding: 14px 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.liquid-glass-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
    mix-blend-mode: overlay;
}

.how-it-works,
.stats-section,
.features-section,
.cta-section {
    position: relative;
    isolation: isolate;
}

.hero-section > *:not(.liquid-glass-overlay),
.how-it-works > *:not(.liquid-glass-overlay),
.stats-section > *:not(.liquid-glass-overlay),
.features-section > *:not(.liquid-glass-overlay),
.cta-section > *:not(.liquid-glass-overlay) {
    position: relative;
    z-index: 2;
}

.btn-secondary {
    flex: 1;
    padding: 14px 32px;
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    background: var(--gray-light);
    border-color: var(--gray-medium);
    transform: translateY(-1px);
}

/* Loading Bar */
.loading-bar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 3px;
    background: var(--gray-light);
    z-index: 1000;
    overflow: hidden;
}

.loading-bar.hidden {
    display: none;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--highlight));
    width: 0%;
    animation: loading 2s ease-in-out infinite;
}

@keyframes loading {
    0% {
        width: 0%;
        margin-left: 0%;
    }
    50% {
        width: 50%;
        margin-left: 25%;
    }
    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* Loading Spinner */
.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    z-index: 100;
    width: 100%;
    max-width: 400px;
    padding: 0 2rem;
}

.loading-spinner.hidden {
    display: none;
}

.loading-bar-container {
    width: 100%;
    height: 8px;
    background: var(--gray-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.loading-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--accent) 0%, 
        var(--highlight) 50%, 
        var(--accent) 100%);
    background-size: 200% 100%;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(132, 169, 140, 0.5);
    width: 0%;
    transition: width 0.3s ease-out;
}

@keyframes loadingBarAnimation {
    0% {
        width: 0%;
        background-position: 0% 0%;
    }
    50% {
        width: 70%;
        background-position: 100% 0%;
    }
    100% {
        width: 100%;
        background-position: 200% 0%;
    }
}

.loading-spinner p {
    font-size: 0.9375rem;
    color: var(--text-light);
    font-weight: 500;
}

.loading-text {
    transition: opacity 0.3s ease;
}

.hidden {
    display: none !important;
}


/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    min-width: 300px;
    max-width: 400px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    pointer-events: all;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.toast-success {
    border-left: 4px solid #10B981;
}

.toast.toast-error {
    border-left: 4px solid #EF4444;
}

.toast.toast-info {
    border-left: 4px solid #3B82F6;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.toast-success .toast-icon {
    color: #10B981;
}

.toast-error .toast-icon {
    color: #EF4444;
}

.toast-info .toast-icon {
    color: #3B82F6;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.8125rem;
    color: var(--text-light);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-lighter);
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: var(--gray-light);
    color: var(--text);
}

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

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

.toast.removing {
    animation: slideOutRight 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Send Button Spinner */
.btn-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

#send-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 968px) {
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .toast {
        min-width: auto;
        max-width: none;
    }
}
