:root {
    /* Modern Dark Color Palette */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    
    /* Dark Theme Neutrals */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-focus: #6366f1;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* Functional Colors */
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Geometry */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
    
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Navigation */
.header-nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 72px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-soft);
}

.header-nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
}

.site-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-logo h1 {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.main-nav a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.main-nav a.active {
    color: white;
    background: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Main Layout */
.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 112px 24px 60px;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Typography */
h1, h2, h3, h4 {
    letter-spacing: -0.02em;
    color: var(--text-main);
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
}

header h1 span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    display: block;
    margin-top: 8px;
}

/* Card Styling */
.form-group, .instructions-container, .confirmation-container, .instruction-block, .contact-card, .download-card, .guide-section {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
}

.instructions-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 32px;
    width: 100%;
}

.instruction-block h2, .instruction-block h3 {
    margin-bottom: 16px;
}

.instruction-block p {
    margin-bottom: 16px;
    flex-grow: 1;
}

.instruction-block .ms-Button, .instruction-block button, .instruction-block .download-button {
    margin-top: auto !important;
}

/* Warning Message */
.warning-message {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-left: 4px solid var(--warning);
    background: rgba(245, 158, 11, 0.1);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.warning-message p {
    margin: 0;
    color: #fbbf24;
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin: 0 auto;
    width: 100%;
}

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-main);
}

.input-wrapper {
    position: relative;
    margin-bottom: 24px;
}

input[type="text"], textarea {
    width: 100%;
    background: #0f172a;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    color: white;
    font-size: 1rem;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.2s ease;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

/* Buttons */
button, .warning-button, .ms-Button, .download-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    width: auto;
    text-decoration: none;
}

button:hover, .download-button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 16px var(--primary-glow);
}

button:disabled {
    background: var(--text-dim);
    cursor: not-allowed;
}

#copyKeyButton, .copy-all-button {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    margin-top: 16px;
    border: 1px solid var(--border-light);
}

/* Tabs */
.home-instructions-tabs, .instructions-tabs, .downloads-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
    background: transparent !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tab-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    padding: 12px 32px;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tab-button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Instruction Block */
.instruction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.prev-slide, .next-slide {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border-radius: var(--radius-sm);
}

.slide-indicators {
    display: flex;
    gap: 8px;
}

.indicator {
    width: 64px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--primary);
}

.indicator.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.slide {
    display: none;
}

.slide.active {
    display: block;
}

/* Images & Grid */
.instruction-image, .step-img {
    width: fit-content;
    max-width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    margin: 20px auto;
    background: transparent;
    display: flex;
    justify-content: center;
}

.instruction-image img, .step-img img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Codes Grid */
.blocks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.confirmation-block {
    background: #0f172a;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
    font-size: 1.1rem;
    color: white;
}

/* Grid Layouts */
.instructions-grid, .download-grid, .contact-grid, .product-sections, .downloads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.downloads-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

@media (min-width: 768px) {
    .download-grid, .contact-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

/* Downloads specific */
.downloads-tabs .tab-button img {
    width: 24px;
    height: 24px;
}

.download-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.section-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.download-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: all 0.2s ease;
    max-width: 510px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.download-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.card-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.flag-icon {
    width: 20px;
    height: auto;
    border-radius: 2px;
    flex-shrink: 0;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-top: 12px;
}

/* Message Styling */
.message {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-weight: 500;
    display: none;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
    .container { padding-top: 100px; }
    header h1 { font-size: 1.8rem; }
    .main-nav a { padding: 8px 12px; font-size: 0.85rem; }
    .blocks-grid { grid-template-columns: repeat(2, 1fr); }
    .instruction-header { flex-direction: column; gap: 16px; align-items: flex-start; }
    .slider-controls { width: 100%; justify-content: space-between; }
}
