/* ==================== CSS Variables ==================== */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    
    --bg-color: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-card: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    --transition-speed: 0.3s;
    --border-radius: 12px;
    --border-radius-sm: 8px;
}

[data-theme="dark"] {
    --bg-color: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --border-color: #374151;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

/* ==================== Reset & Base Styles ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed) ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Navigation ==================== */
.navbar {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.logo i {
    font-size: 1.8rem;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color var(--transition-speed) ease;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.theme-toggle {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--transition-speed) ease;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    color: white;
    transform: rotate(20deg);
}

/* ==================== Hero Section ==================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.floating-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 8rem;
    color: white;
    opacity: 0.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ==================== Buttons ==================== */
.btn {
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==================== Features Section ==================== */
.features {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: all var(--transition-speed) ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== Tools Section ==================== */
.tools {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.tool-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.tool-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.tool-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
}

.tool-header h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-header p {
    opacity: 0.95;
    font-size: 1rem;
}

.tool-body {
    padding: 2rem;
}

.upload-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    background-color: var(--bg-secondary);
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-card);
}

.upload-area.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
    transform: scale(1.02);
}

.upload-area i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-area p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.upload-hint {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 1rem 0;
}

.note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-style: italic;
}

.preview-area {
    margin-top: 2rem;
    display: none;
}

.preview-area.active {
    display: block;
}

.preview-item {
    background-color: var(--bg-secondary);
    border-radius: var(--border-radius-sm);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 150px 1fr auto;
    gap: 1.5rem;
    align-items: center;
    border: 1px solid var(--border-color);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.preview-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--border-color);
}

.preview-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.preview-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.preview-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-download {
    background-color: var(--success-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all var(--transition-speed) ease;
    white-space: nowrap;
}

.btn-download:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-remove {
    background-color: var(--danger-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.btn-remove:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
}

/* ==================== FAQ Section ==================== */
.faq {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.faq-container {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-sm);
    margin-bottom: 1rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition-speed) ease;
}

.faq-question:hover {
    background-color: var(--bg-secondary);
}

.faq-question h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.faq-question i {
    color: var(--primary-color);
    transition: transform var(--transition-speed) ease;
    font-size: 1.2rem;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease, padding var(--transition-speed) ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== Footer ==================== */
.footer {
    background-color: var(--bg-card);
    padding: 60px 0 20px;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-logo i {
    font-size: 1.8rem;
}

.footer-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    transition: all var(--transition-speed) ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-column h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    transition: all var(--transition-speed) ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all var(--transition-speed) ease;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-form button {
    padding: 0.875rem 1.25rem;
    background-color: var(--primary-color);
    color: white;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed) ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.newsletter-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.75rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* ==================== Content Pages ==================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.content-section {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.content-container {
    max-width: 900px;
    margin: 0 auto;
}

.content-card {
    background-color: var(--bg-card);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.content-card h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
}

.content-card h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-card p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-card ul,
.content-card ol {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.content-card li {
    margin-bottom: 0.75rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-speed) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .floating-card {
        display: none;
    }
    
    .preview-item {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .preview-image {
        margin: 0 auto;
    }
    
    .preview-actions {
        flex-direction: row;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-speed) ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .content-card {
        padding: 2rem 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .features,
    .tools,
    .faq,
    .content-section {
        padding: 40px 0;
    }
    
    .tool-header {
        padding: 1.5rem;
    }
    
    .tool-header h3 {
        font-size: 1.3rem;
    }
    
    .upload-area {
        padding: 2rem 1rem;
    }
}

/* ==================== Loading Animation ==================== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== Utility Classes ==================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }