/* ============================================
   SecureMail - Webmail Login Template
   ============================================ */

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --green-50: #f0fdf4;
    --green-100: #dcfce7;
    --green-200: #bbf7d0;
    --green-300: #86efac;
    --green-400: #4ade80;
    --green-500: #22c55e;
    --green-600: #16a34a;
    --green-700: #15803d;
    --green-800: #166534;
    --green-900: #14532d;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   Header
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gray-900);
}

.logo-icon {
    display: flex;
    align-items: center;
}

.logo-text {
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--green-600);
    background: var(--green-50);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.btn-login {
    width: 100%;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    color: var(--white);
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--green-700), var(--green-800));
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.45);
    transform: translateY(-1px);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-cta {
    background: var(--white);
    color: var(--green-700);
    padding: 14px 32px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.btn-cta:hover {
    background: var(--green-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-footer {
    background: var(--green-600);
    color: var(--white);
    padding: 10px 24px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.btn-footer:hover {
    background: var(--green-700);
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-social:hover {
    border-color: var(--green-300);
    background: var(--green-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Badge
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--green-50);
    color: var(--green-700);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 100px;
    border: 1px solid var(--green-200);
    letter-spacing: 0.02em;
}

.highlight {
    background: linear-gradient(135deg, var(--green-600), var(--green-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 24px 60px;
    overflow: hidden;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 25%, #f0fdf4 50%, #dcfce7 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.15;
}

.hero-shape-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--green-400), transparent 70%);
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.hero-shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--green-300), transparent 70%);
    bottom: -100px;
    left: -100px;
    animation: float 10s ease-in-out infinite reverse;
}

.hero-shape-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--green-500), transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 12s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.hero-container {
    max-width: 1280px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    max-width: 560px;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--gray-900);
    margin: 20px 0;
    letter-spacing: -0.02em;
}

.hero-text > p {
    font-size: 1.15rem;
    color: var(--gray-500);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--green-100);
    border-radius: 50%;
}

/* ============================================
   Login Card
   ============================================ */
.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    max-width: 460px;
    width: 100%;
    position: relative;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--green-400), var(--green-600), var(--green-500));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 0.9rem;
    color: var(--gray-500);
}

/* ============================================
   Form Styles
   ============================================ */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-700);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    pointer-events: none;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-900);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input::placeholder {
    color: var(--gray-400);
}

.input-wrapper input:focus {
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.input-wrapper input:hover:not(:focus) {
    border-color: var(--gray-300);
}

.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toggle-password:hover svg path,
.toggle-password:hover svg circle {
    stroke: var(--gray-600);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1.5px solid var(--gray-300);
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background: var(--green-600);
    border-color: var(--green-600);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.forgot-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--green-600);
}

.forgot-link:hover {
    color: var(--green-700);
    text-decoration: underline;
}

/* ============================================
   Login Footer
   ============================================ */
.login-footer {
    margin-top: 28px;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.divider span {
    font-size: 0.8rem;
    color: var(--gray-400);
    white-space: nowrap;
}

.social-login {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.signup-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

.signup-text a {
    color: var(--green-600);
    font-weight: 600;
}

.signup-text a:hover {
    color: var(--green-700);
    text-decoration: underline;
}

/* ============================================
   Features Section
   ============================================ */
.features-section {
    padding: 100px 24px;
    background: var(--white);
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 16px 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--gray-500);
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    padding: 32px;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
}

.feature-card:hover {
    background: var(--white);
    border-color: var(--green-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--green-50);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    transition: var(--transition);
}

.feature-card:hover .feature-card-icon {
    background: var(--green-100);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-section {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
}

.cta-container {
    max-width: 800px;
    margin: 0 auto;
}

.cta-card {
    text-align: center;
    background: linear-gradient(135deg, var(--green-600), var(--green-700));
    padding: 60px 40px;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(22, 163, 74, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
    border-radius: 50%;
}

.cta-card::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    border-radius: 50%;
}

.cta-card h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.cta-card p {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.cta-card .btn-cta {
    position: relative;
    z-index: 1;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 60px 24px 0;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 16px;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-400);
}

.footer-col h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul a {
    font-size: 0.9rem;
    color: var(--gray-400);
    transition: var(--transition);
}

.footer-col ul a:hover {
    color: var(--green-400);
    padding-left: 4px;
}

.footer-note {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-bottom {
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* ============================================
   Mobile Responsive
   ============================================ */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-text {
        max-width: 100%;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.5rem;
    }

    .hero-features {
        justify-content: center;
    }

    .login-card {
        max-width: 460px;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 64px;
    }

    .main-nav {
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 16px 24px;
        transform: translateY(-120%);
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--gray-100);
    }

    .main-nav.active {
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 4px;
    }

    .nav-link {
        display: block;
        padding: 12px 16px;
        font-size: 1rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero-section {
        padding: 80px 16px 40px;
        min-height: auto;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text > p {
        font-size: 1rem;
    }

    .login-card {
        padding: 28px 24px;
    }

    .features-section {
        padding: 60px 16px;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-card {
        padding: 24px;
    }

    .cta-section {
        padding: 40px 16px;
    }

    .cta-card {
        padding: 40px 24px;
    }

    .cta-card h2 {
        font-size: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .site-footer {
        padding: 40px 16px 0;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.75rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .form-options {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .social-login {
        gap: 8px;
    }

    .btn-social {
        width: 44px;
        height: 44px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.6s ease-out;
}

.hero-text {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

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

/* ============================================
   Selection
   ============================================ */
::selection {
    background: var(--green-200);
    color: var(--green-900);
}