:root {
            --primary-color: #6366f1;
            --primary-hover: #5855eb;
            --secondary-color: #f8fafc;
            --text-primary: #1e293b;
            --text-secondary: #64748b;
            --border-color: #e2e8f0;
            --success-color: #10b981;
            --background: #ffffff;
            --card-background: #ffffff;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }

        [data-theme="dark"] {
            --primary-color: #818cf8;
            --primary-hover: #6366f1;
            --secondary-color: #1e293b;
            --text-primary: #f1f5f9;
            --text-secondary: #94a3b8;
            --border-color: #334155;
            --background: #0f172a;
            --card-background: #1e293b;
            --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
            --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
        }

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

        body {
            font-family: 'Inter', sans-serif;
            background: var(--background);
            color: var(--text-primary);
            line-height: 1.6;
            transition: all 0.3s ease;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* Navbar */
        .navbar {
            background: var(--card-background);
            border-bottom: 1px solid var(--border-color);
            padding: 1rem 0;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 2rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--primary-color);
            text-decoration: none;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .logo i {
            font-size: 1.8rem;
        }

        .theme-toggle {
            background: var(--secondary-color);
            border: 1px solid var(--border-color);
            border-radius: 50px;
            padding: 0.5rem;
            cursor: pointer;
            transition: all 0.3s ease;
            color: var(--text-secondary);
        }

        .theme-toggle:hover {
            background: var(--primary-color);
            color: white;
            transform: scale(1.1);
        }

        /* Main Content */
        .main-content {
            flex: 1;
            max-width: 900px;
            margin: 0 auto;
            padding: 3rem 2rem;
            width: 100%;
        }

        .hero {
            text-align: center;
            margin-bottom: 3rem;
        }

        .hero h1 {
            font-size: 3rem;
            font-weight: 700;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .hero p {
            font-size: 1.2rem;
            color: var(--text-secondary);
            max-width: 600px;
            margin: 0 auto;
        }

        /* Form Container */
        .form-container {
            background: var(--card-background);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border-color);
            margin-bottom: 2rem;
        }

        .form-group {
            margin-bottom: 2rem;
        }

        .form-label {
            display: block;
            font-weight: 600;
            margin-bottom: 0.75rem;
            color: var(--text-primary);
            font-size: 1.1rem;
        }

        .email-input {
            width: 100%;
            min-height: 200px;
            padding: 1.25rem;
            border: 2px solid var(--border-color);
            border-radius: 12px;
            font-family: inherit;
            font-size: 1rem;
            background: var(--background);
            color: var(--text-primary);
            resize: vertical;
            transition: all 0.3s ease;
        }

        .email-input:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
            transform: translateY(-2px);
        }

        .email-input::placeholder {
            color: var(--text-secondary);
        }

        /* Tone Selector */
        .tone-selector {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
        }

        .tone-option {
            background: var(--background);
            border: 2px solid var(--border-color);
            border-radius: 12px;
            padding: 1rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
        }

        .tone-option:hover {
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .tone-option.active {
            background: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
            transform: translateY(-2px);
            box-shadow: var(--shadow);
        }

        .tone-option i {
            display: block;
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

        /* Generate Button */
        .generate-btn {
            width: 100%;
            background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
            color: white;
            border: none;
            border-radius: 12px;
            padding: 1.25rem 2rem;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 1rem;
            position: relative;
            overflow: hidden;
        }

        .generate-btn:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: var(--shadow-lg);
        }

        .generate-btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

        .generate-btn .loading {
            display: none;
        }

        .generate-btn.loading .loading {
            display: inline-block;
            animation: spin 1s linear infinite;
        }

        .generate-btn.loading .btn-text {
            display: none;
        }

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

        /* Result Container */
        .result-container {
            background: var(--card-background);
            border-radius: 20px;
            padding: 2.5rem;
            box-shadow: var(--shadow-lg);
            border: 1px solid var(--border-color);
            margin-top: 2rem;
            opacity: 0;
            transform: translateY(20px);
            transition: all 0.5s ease;
        }

        .result-container.show {
            opacity: 1;
            transform: translateY(0);
        }

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

        .result-title {
            font-size: 1.3rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .copy-btn {
            background: var(--success-color);
            color: white;
            border: none;
            border-radius: 8px;
            padding: 0.75rem 1.5rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .copy-btn:hover {
            background: #059669;
            transform: translateY(-1px);
        }

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

        /* Download Button */
        .download-btn {
            background: #8b5cf6;
            color: white;
            border: none;
            border-radius: 8px;
            padding: 0.75rem 1.5rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-left: 0.5rem;
        }

        .download-btn:hover {
            background: #7c3aed;
            transform: translateY(-1px);
        }

        .action-buttons {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .reply-output {
            background: var(--background);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            padding: 1.5rem;
            font-size: 1rem;
            line-height: 1.7;
            white-space: pre-wrap;
            min-height: 150px;
        }

        /* Footer */
        .footer {
            background: var(--card-background);
            border-top: 1px solid var(--border-color);
            padding: 2rem 0;
            text-align: center;
            margin-top: auto;
        }

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

        .social-links {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin-bottom: 1rem;
        }

        .social-link {
            color: var(--text-secondary);
            font-size: 1.5rem;
            transition: all 0.3s ease;
        }

        .social-link:hover {
            color: var(--primary-color);
            transform: translateY(-2px);
        }

        .copyright {
            color: var(--text-secondary);
            font-size: 0.9rem;
        }

        /* Mobile Responsiveness */
        @media (max-width: 1024px) {
    .main-content {
        max-width: 100%;
        padding: 2rem 1rem;
    }
    .form-container, .result-container {
        padding: 2rem 1rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    .main-content {
        padding: 1.5rem 0.5rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .form-container {
        padding: 1.2rem 0.5rem;
    }
    .tone-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    .result-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    .action-buttons {
        justify-content: center;
    }
    .reply-output {
        padding: 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.3rem;
    }
    .form-container {
        padding: 0.7rem 0.2rem;
    }
    .tone-selector {
        grid-template-columns: 1fr;
    }
    .reply-output {
        font-size: 0.9rem;
        padding: 0.7rem;
    }
    .generate-btn, .copy-btn, .download-btn {
        padding: 0.7rem 0.5rem;
        font-size: 1rem;
    }
    .result-container {
        padding: 1rem 0.2rem;
    }
    .footer-content {
        padding: 0 0.5rem;
    }
}

/* Prevent horizontal scroll on mobile */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}
