/* Modern Premium Theme Variables */
:root {
    /* Primary Palette */
    --primary-color: #3b82f6;
    /* Vibrant Blue */
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --accent-color: #8b5cf6;
    /* Violet accent for gradients */

    /* Neutral Palette */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg-body: #f0f9ff;
    /* Very light blue tint */
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(255, 255, 255, 0.7);

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #0ea5e9;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.5);

    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --gradient-hover: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    --gradient-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--gradient-bg);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

h2 {
    font-size: 2rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

/* Header & Navigation */
.header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

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

.logo span {
    color: var(--text-main);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

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

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-150%);
    transition: var(--transition);
    z-index: 999;
}

.mobile-menu.active {
    transform: translateY(0);
}

.mobile-nav-link {
    display: block;
    padding: 1rem;
    border-bottom: 1px solid var(--bg-body);
    font-weight: 500;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Cards & Containers */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 1.5rem;
}

.label,
.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.input,
.select,
.textarea,
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.input:focus,
.select:focus,
.textarea:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

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

.btn-success:hover {
    background: #059669;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Ad Containers */
.ad-container {
    margin: 2rem auto;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 100px;
    border: 1px dashed var(--text-light);
}

.ad-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    text-align: center;
    display: block;
}

/* Footer */
.footer {
    background: white;
    padding: 4rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

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

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-4xl {
    font-size: 2.25rem;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-primary {
    color: var(--primary-color);
}

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger,
.text-error {
    color: var(--error);
}

.text-info {
    color: var(--info);
}

.text-muted {
    color: var(--text-muted);
}

.bg-body {
    background-color: var(--bg-body);
}

.bg-white {
    background-color: white;
}

.rounded {
    border-radius: var(--radius-md);
}

.border {
    border-width: 1px;
    border-style: solid;
}

.border-border {
    border-color: #e2e8f0;
}

.border-primary {
    border-color: var(--primary-color);
}

.border-success {
    border-color: var(--success);
}

.shadow-lg {
    box-shadow: var(--shadow-lg);
}

/* Component Specific Styles */

/* Password Generator */
.type-card {
    border: 2px solid transparent;
    transition: var(--transition);
}

.type-card:hover {
    border-color: var(--primary-light);
    background: rgba(59, 130, 246, 0.05);
}

.type-card.active {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease-out;
    z-index: 2000;
}

.toast.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

/* Product Cards */
.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Privacy Policy */
.highlight-box {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 1.5rem 0;
}

.contact-info {
    background: var(--bg-body);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

/* FAQ */
.faq-item {
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.5rem;
    background: var(--bg-body);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-main);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-answer {
    display: none;
    background: white;
}

.faq-answer.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.faq-answer p {
    padding: 1.5rem;
    margin: 0;
    color: var(--text-muted);
    border-top: 1px solid #e2e8f0;
}

/* Blog */
.blog-card {
    overflow: hidden;
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

/* QR Generator Tabs */
.tab-button {
    white-space: nowrap;
    transition: var(--transition);
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.tab-button:not(.active):hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    scrollbar-width: thin;
}

.tabs::-webkit-scrollbar {
    height: 6px;
}

.tabs::-webkit-scrollbar-track {
    background: var(--bg-body);
    border-radius: 3px;
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Compressor */
.upload-area {
    border: 2px dashed #e2e8f0;
    border-radius: var(--radius-md);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.05);
}

.bg-success-light {
    background: rgba(16, 185, 129, 0.1);
}

/* Human Text Converter */
.status-indicator {
    position: fixed;
    top: 100px;
    right: 30px;
    background: rgba(76, 175, 80, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 900;
    box-shadow: 0 5px 20px rgba(76, 175, 80, 0.3);
    animation: slideInRight 0.8s ease-out;
}

.detection-result {
    display: none;
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
    text-align: center;
    font-weight: 700;
    color: white;
    animation: fadeInUp 0.5s ease-out;
}

.detection-result.excellent {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.detection-result.good {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.detection-result.warning {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.detection-result.poor {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.processing {
    display: none;
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin: 1.5rem 0;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 4px;
}

.control-value {
    color: var(--primary-color);
    font-weight: 600;
    float: right;
}

/* Number Converter */
.format-card {
    transition: var(--transition);
}

.format-card.active {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
}

.bg-primary-light {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* QR Generator Specific */
#loading.show,
#qr-result.show {
    display: block !important;
}

.spinner {
    animation: spin 1s linear infinite;
}

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

    100% {
        transform: rotate(360deg);
    }
}

#colorSection.active {
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 3rem 0;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

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