:root {
    --primary: #735af2;
    --primary-hover: #5d44d8;
    --dark: #1e1e2f;
    --light-bg: #f8f9fd;
    --white: #ffffff;
    --text-main: #33334d;
    --text-muted: #6b7280;
    --border: #e2e8f0;
    --shadow: 0 10px 30px rgba(115, 90, 242, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

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

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

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

.nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-links a.active {
    color: var(--primary);
}

.nav-links a.active::after {
    width: 100%;
}

/* Page Content */
.page-content {
    padding: 60px 0 100px;
}

.about-hero {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.about-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-muted);
}

.content-card {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    margin-bottom: 40px;
}

.content-card h2 {
    margin-bottom: 20px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.feature-item {
    background: var(--white);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.f-icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
    display: block;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 50px;
    margin-top: 50px;
}

.contact-form-card {
    background: var(--white);
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(115, 90, 242, 0.1);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    gap: 20px;
    background: var(--white);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.info-icon {
    font-size: 1.5rem;
}

.info-text h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.info-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
}

/* Footer Refinement */
.footer-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    border-top: 1px solid var(--border);
    margin-top: 50px;
}

.footer-small-links {
    display: flex;
    gap: 25px;
}

.footer-small-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
}

.footer-small-links a:hover {
    color: var(--primary);
}

#history-nav-btn {
    white-space: nowrap;
}

.btn-outline {
    padding: 0.6rem 1.5rem;
    border: 2px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    padding: 80px 0;
    text-align: center;
    background: radial-gradient(circle at top right, rgba(115, 90, 242, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(115, 90, 242, 0.05), transparent);
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.language-selection {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.language-selection label {
    font-weight: 600;
    color: var(--dark);
}

.language-selection select {
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: var(--white);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.language-selection select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(115, 90, 242, 0.1);
}

/* Upload Container */
.upload-container {
    background: var(--white);
    border-radius: 24px;
    padding: 40px;
    box-shadow: var(--shadow);
    border: 2px dashed var(--border);
    max-width: 800px;
    margin: 0 auto;
    transition: var(--transition);
    cursor: pointer;
}

.upload-container.drag-over {
    border-color: var(--primary);
    background: rgba(115, 90, 242, 0.02);
    transform: scale(1.02);
}

.upload-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.upload-icon {
    color: var(--primary);
    margin-bottom: 10px;
}

.upload-box h3 {
    font-size: 1.5rem;
    color: var(--dark);
}

.btn-primary {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    margin: 10px 0;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 90, 242, 0.3);
}

.format-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Loader */
#processing-status {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--border);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    animation: rotation 1s linear infinite;
}

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

.hidden {
    display: none !important;
}

/* History Section */
.history-section {
    padding: 60px 0;
    background: var(--white);
}

.history-section h2 {
    margin-bottom: 30px;
    font-size: 2rem;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

#history-expand {
    margin-top: 30px;
    text-align: center;
}

.btn-secondary {
    padding: 0.8rem 2.5rem;
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

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

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: #fdfbff;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
}

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

.accordion-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.accordion-header {
    width: 100%;
    padding: 20px 30px;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.accordion-header span {
    font-size: 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.accordion-item.active .accordion-header span {
    transform: rotate(45deg);
}

.accordion-body {
    padding: 0 30px 20px;
    display: none;
    color: var(--text-muted);
    font-size: 1rem;
}

.accordion-item.active .accordion-body {
    display: block;
}

.history-card {
    background: var(--light-bg);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.history-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.history-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.history-preview {
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.btn-view {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 24px;
    position: relative;
    z-index: 1001;
    overflow-y: auto;
    animation: slideUp 0.4s ease-out;
}

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

.modal-header {
    padding: 25px 30px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 30px;
}

.result-area {
    margin-bottom: 30px;
}

textarea {
    width: 100%;
    height: 180px;
    padding: 20px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: var(--light-bg);
    font-family: inherit;
    font-size: 1rem;
    resize: none;
    margin-bottom: 20px;
    caret-color: transparent;
    cursor: default;
}

textarea:focus {
    outline: none;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

.btn-copy, .btn-download {
    flex: 1;
    padding: 0.8rem 1.5rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

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

.btn-copy:hover {
    background: #000;
}

.btn-download {
    background: var(--white);
    color: var(--dark);
    border: 2px solid var(--dark);
}

.btn-download:hover {
    background: var(--dark);
    color: var(--white);
}

/* Premium CTA Section in Popup */
.cta-section {
    margin-top: 35px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.cta-header {
    text-align: center;
    margin-bottom: 25px;
}

.cta-header h3 {
    font-size: 1.4rem;
    color: #1e293b;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.cta-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.sparkle-icon {
    font-size: 1.6rem;
    animation: sparkle 2s infinite ease-in-out;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2) rotate(10deg); }
}

.cta-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.cta-link {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Shimmer Effect */
.cta-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.6),
        transparent
    );
    transition: all 0.6s;
    z-index: 1;
}

.cta-link:hover::before {
    left: 150%;
}

.cta-link:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(115, 90, 242, 0.15);
}

.cta-icon {
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-info {
    flex: 1;
}

.btn-high-ctr {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.rec-tag {
    font-size: 0.7rem;
    color: #6366f1;
    font-weight: 900;
    letter-spacing: 1px;
}

/* Best Choice Premium Highlight */
.pulse {
    border: 2px solid #f59e0b !important;
    background: linear-gradient(to bottom right, #fffcf0, #ffffff) !important;
}

.pulse .rec-tag {
    color: #d97706;
}

.pulse .btn-high-ctr {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.pulse::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
    animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    70% { box-shadow: 0 0 0 12px rgba(245, 158, 11, 0); }
    100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.cta-title {
    font-weight: 800;
    color: var(--dark);
    font-size: 1.15rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: 800;
}

.badge.speed { background: #dcfce7; color: #166534; }
.badge.pro { background: #dbeafe; color: #1e40af; }
.badge.hot { background: #fee2e2; color: #991b1b; }
.badge.save { background: #fef9c3; color: #854d0e; }
.badge.ai { background: #ede9fe; color: #5b21b6; }

.cta-info p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    line-height: 1.4;
}

.cta-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    font-weight: 700;
    color: #059669;
    font-size: 0.95rem;
}

.cta-action {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    .nav { display: none; }
    .modal-content { width: 95%; }
}
.ai-signature {
    font-size: 0.85rem;
    margin-top: 15px;
    color: var(--text-muted);
    opacity: 0.9;
}

.ai-signature strong {
    color: var(--primary);
    font-weight: 600;
}

/* Intro Section */
.intro-section {
    padding: 60px 0;
    background: #f8fafc;
}

.intro-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}

.intro-card h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--dark);
    font-weight: 800;
}

.intro-card p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-muted);
}

.intro-card strong {
    color: var(--primary);
}
