:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #ec4899;
    --secondary-dark: #db2777;
    --accent: #10b981;
    --accent-dark: #059669;
    --background: #f9fafb;
    --text: #1f2937;
    --text-light: #6b7280;
    --card-bg: #ffffff;
    --header-bg: #ffffff;
    --footer-bg: #111827;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --gradient: linear-gradient(135deg, #4f46e5 0%, #ec4899 100%);
}

.dark-mode {
    --background: #111827;
    --text: #f9fafb;
    --text-light: #d1d5db;
    --card-bg: #1f2937;
    --header-bg: #1f2937;
    --footer-bg: #030712;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--header-bg);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    background: var(--gradient);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link.active {
    color: var(--primary);
}

.nav-link:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient);
    transition: width 0.3s;
}

.nav-link:hover:after,
.nav-link.active:after {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.theme-switch-wrapper {
    display: flex;
    align-items: center;
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 30px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background: var(--gradient);
}

input:checked+.slider:before {
    transform: translateX(30px);
}

.language-selector {
    background: var(--card-bg);
    border: 1px solid var(--text-light);
    border-radius: 8px;
    padding: 8px 12px;
    color: var(--text);
    font-weight: 500;
    cursor: pointer;
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
    padding: 3rem 0;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary);
}

/* Features Section */
.features-section {
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary);
}

/* App Container */
.app-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 968px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
}

.card-title i {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

textarea {
    width: 100%;
    min-height: 250px;
    padding: 1.2rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    resize: vertical;
    background-color: var(--card-bg);
    color: var(--text);
    transition: border-color 0.3s, box-shadow 0.3s;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.enhancement-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: rgba(79, 70, 229, 0.08);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.option:hover {
    transform: translateY(-3px);
    background-color: rgba(79, 70, 229, 0.15);
    border-color: var(--primary);
}

.option.active {
    background-color: var(--primary);
    color: white;
}

.option.active i {
    color: white;
}

.buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(79, 70, 229, 0.4);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 6px rgba(236, 72, 153, 0.3);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(236, 72, 153, 0.4);
}

.btn-accent {
    background-color: var(--accent);
    color: white;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--text-light);
    color: var(--text);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: white;
}

.history-panel {
    margin-top: 2rem;
}

.history-item {
    padding: 1.2rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.history-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.history-item:last-child {
    border-bottom: none;
}

.history-text {
    flex: 1;
    margin-right: 15px;
}

.history-text .original {
    color: var(--text);
    margin-bottom: 0.5rem;
}

.history-text .timestamp {
    font-size: 0.8rem;
    color: var(--text-light);
}

.history-actions {
    display: flex;
    gap: 10px;
}

.history-actions button {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Pricing Section */
.pricing-section {
    margin: 3rem 0;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.pricing-card {
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.price span {
    font-size: 1rem;
    color: var(--text-light);
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.pricing-card li {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card .fas.fa-check {
    color: var(--accent);
}

.pricing-card .fas.fa-times {
    color: var(--secondary);
}

/* About Section */
.about-section {
    margin: 3rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
}

.about-image {
    text-align: center;
}

.about-image i {
    font-size: 8rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Download Section */
.download-section {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
    background: var(--gradient);
    border-radius: 16px;
    color: white;
}

.download-section .section-title,
.download-section p {
    color: white;
}

.download-options {
    display: none;
    margin-top: 1.5rem;
    background-color: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.download-options.show {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.download-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.download-btn:hover {
    background-color: rgba(16, 185, 129, 0.2);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.download-btn i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.download-btn span {
    font-weight: 600;
    color: var(--text);
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg);
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-description {
    color: #d1d5db;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all 0.2s;
}

.social-link:hover {
    background: var(--gradient);
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #374151;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .card {
        padding: 1.5rem;
    }

    .buttons {
        flex-direction: column;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .pricing-cards {
        grid-template-columns: 1fr;
    }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-5px);
    }
}