/* IISL Demo Styles */
/* Technical demonstration interface for Image Intelligent Storage Language */

/* ===== CSS Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --white: #ffffff;
    --bg-light: #f8fafc;
    --gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--bg-light);
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 900;
}

.logo-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-sub {
    color: var(--dark);
    font-weight: 400;
}

.btn-back {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-back:hover {
    background: var(--bg-light);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 1rem;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
    box-shadow: var(--shadow);
    border: none;
}

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

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

/* ===== Hero Section ===== */
.hero {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--accent);
    border-radius: 50px;
    font-weight: 600;
    color: var(--dark);
    box-shadow: var(--shadow);
}

.badge-icon {
    font-size: 1.25rem;
}

.badge-text {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== Demo Section ===== */
.demo-section {
    padding: 60px 0;
}

/* Upload Area */
.upload-area {
    margin-bottom: 3rem;
}

.upload-box {
    border: 3px dashed var(--gray-light);
    border-radius: 16px;
    padding: 4rem 2rem;
    text-align: center;
    background: var(--white);
    transition: all 0.3s;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary);
    background: var(--bg-light);
}

.upload-box.drag-over {
    border-color: var(--primary);
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.upload-box h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.upload-box p {
    color: var(--gray);
    margin-bottom: 0.5rem;
}

.upload-hint {
    font-size: 0.875rem;
    color: var(--gray-light);
    margin-bottom: 1.5rem !important;
}

/* Controls Panel */
.controls-panel {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
}

.controls-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.control-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--gray-light);
    outline: none;
    -webkit-appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: var(--shadow);
}

.control-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    cursor: pointer;
}

.control-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Comparison Container */
.comparison-container {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 3rem;
}

.comparison-header {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-header h2 {
    font-size: 2rem;
    color: var(--dark);
}

/* Image Comparison */
.image-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.image-panel {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    border: 2px solid var(--gray-light);
}

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

.panel-header h3 {
    font-size: 1.25rem;
    color: var(--dark);
}

.file-size {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    background: var(--dark);
    color: var(--white);
    border-radius: 6px;
    font-size: 0.875rem;
}

.file-size.compressed {
    background: var(--gradient-secondary);
}

.image-container {
    background: var(--white);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    box-shadow: var(--shadow);
}

.image-container canvas {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 6px;
}

.info-label {
    font-weight: 600;
    color: var(--gray);
    font-size: 0.875rem;
}

.info-value {
    font-family: 'JetBrains Mono', monospace;
    color: var(--dark);
    font-size: 0.875rem;
}

/* Metrics Panel */
.metrics-panel {
    margin-top: 3rem;
}

.metrics-panel h3 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    text-align: center;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    border: 2px solid transparent;
    transition: all 0.3s;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.metric-card.highlight {
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    border-color: var(--primary);
}

.metric-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--dark);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.25rem;
}

.metric-detail {
    font-size: 0.875rem;
    color: var(--gray);
}

/* Analysis Section */
.analysis-section {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary);
}

.analysis-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.analysis-content {
    color: var(--dark);
}

.analysis-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--white);
    border-radius: 6px;
    line-height: 1.6;
}

.analysis-item:last-child {
    margin-bottom: 0;
}

.analysis-item.highlight {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-left: 4px solid var(--secondary);
    font-weight: 600;
}

/* Technical Details */
.technical-details {
    background: var(--dark);
    color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.technical-details h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.tech-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--dark-light);
    border-radius: 6px;
}

.spec-label {
    font-weight: 600;
    color: var(--gray-light);
    font-size: 0.875rem;
}

.spec-value {
    font-family: 'JetBrains Mono', monospace;
    color: var(--white);
    font-size: 0.875rem;
}

/* Download Section */
.download-section {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.info-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.info-card {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.info-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 2rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .image-comparison {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .upload-box {
        padding: 3rem 1.5rem;
    }

    .controls-panel,
    .comparison-container {
        padding: 1.5rem;
    }

    .download-section {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}

/* ===== Smooth Scrolling ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Selection ===== */
::selection {
    background: var(--primary);
    color: white;
}

/* ===== Loading Animation ===== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s infinite;
}
