:root {
    /* Custom Color Palette */
    --savoy-blue: #5964A6;
    --penn-blue: #0C1B49;
    --platinum: #DFE1E8;
    --resolution-blue: #182575;
    --international-klein-blue: #232F9F;
    
    /* Application Colors */
    --primary-color: var(--international-klein-blue);
    --secondary-color: var(--platinum);
    --text-color: var(--penn-blue);
    --border-color: #c4c7d1;
    --accent-color: var(--savoy-blue);
    --dark-accent: var(--resolution-blue);
    
    /* Layout */
    --container-width: 800px;
    --border-radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: max-width 0.3s ease;
}

header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    min-height: 50px;
    transition: all 0.3s ease;
}

.restart-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.restart-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

main {
    padding: 30px;
    min-height: 450px;
}

.wizard-step {
    display: none;
    animation: fadeIn 0.5s;
}

.wizard-step.active {
    display: block;
}

/* Hero Section - Two Column Layout */
.hero-section {
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(223, 225, 232, 0.3) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: var(--border-radius);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left Column - Content */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    text-align: center;
}

.hero-logo {
    width: 50px;
    height: 50px;
    filter: drop-shadow(0 4px 8px rgba(35, 47, 159, 0.3));
}

.hero-title {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    margin: 0;
    font-size: 1.1rem;
    color: var(--accent-color);
    font-weight: 500;
    line-height: 1.4;
}

.hero-description {
    margin: 0;
    font-size: 1rem;
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.6;
    max-width: 600px;
}

.hero-cta-btn {
    margin-top: 10px;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    box-shadow: 0 4px 12px rgba(35, 47, 159, 0.3);
}

.hero-cta-btn:hover {
    background: var(--dark-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(35, 47, 159, 0.4);
}

.hero-cta-btn:active {
    transform: translateY(0);
}

.hero-import-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.hero-import-text {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.7;
}

.import-file-label {
    display: inline-block;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    background: var(--secondary-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.import-file-label:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-1px);
}

/* Right Column - Visual */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-right .browser-mockup {
    max-width: 500px;
    width: 100%;
}

/* Responsive adjustments for hero */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Responsive adjustments for test & preview */
@media (max-width: 1000px) {
    .test-preview-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .test-preview-left {
        text-align: left;
        max-height: none;
        overflow-y: visible;
    }
    
    .test-preview-right {
        position: relative;
        top: 0;
    }
    
    .test-preview-right .browser-mockup {
        max-width: 550px;
    }
    
    .preview-update-btn {
        max-width: 250px;
    }
}

/* Animated gradient for intro */
.animated-gradient {
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        #1a1a2e,
        #16213e,
        #0f3460,
        #533483,
        #1e3a8a,
        #7c2d12,
        #831843,
        #164e63
    );
    background-size: 400% 400%;
    animation: gradientShift 6s ease infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.power-app-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

.power-app-emoji {
    font-size: 20px;
    line-height: 1;
    animation: emojiPulse 2s ease infinite;
}

.power-app-text {
    font-size: 13px;
    font-weight: 900;
    text-align: center;
    z-index: 10;
    color: #f5f5f5;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
    line-height: 1.3;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    33% {
        background-position: 100% 50%;
    }
    66% {
        background-position: 50% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes emojiPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.wizard-step h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
    color: var(--primary-color);
}

.wizard-step h3 {
    margin-top: 25px;
    color: #444;
}

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

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

.form-group input[type="text"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .description {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    padding: 20px 30px;
    background-color: var(--secondary-color);
    border-top: 1px solid #e0e0e0;
    transition: opacity 0.3s ease;
}

.nav-btn {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    min-width: 120px; /* For consistent button sizing */
}

.nav-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.nav-btn.building {
    cursor: wait;
    background-color: var(--dark-accent);
}

#prev-btn {
    background-color: #e0e0e0;
    color: var(--text-color);
}

#prev-btn:not(:disabled):hover {
    background-color: #d0d0d0;
}

#next-btn, .action-btn {
    background-color: var(--primary-color);
    color: #fff;
}

#next-btn:not(:disabled):hover, .action-btn:hover {
    background-color: var(--dark-accent);
}

.nav-btn:active, .action-btn:active {
    transform: translateY(1px);
}

.bookmarklet-link {
    display: inline-block;
    padding: 10px 15px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    border: 2px dashed rgba(255,255,255,0.5);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    cursor: grab;
    transition: all 0.3s;
}

.bookmarklet-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gif-placeholder {
    position: relative;
    width: 100%;
    min-height: 200px;
    margin: 15px 0;
    background-color: #e0e0e0;
    border: 2px dashed #999;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.instructional-gif {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
}

.gif-missing-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 40px 20px;
    text-align: center;
    color: #666;
}

.gif-missing-text span {
    font-size: 18px;
    font-weight: 600;
}

.gif-missing-text small {
    font-size: 14px;
    color: #888;
    font-style: italic;
}

/* Icon Upload Styles */
.icon-upload-section {
    margin: 20px 0;
}

.icon-choice-container {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.icon-choice-option {
    flex: 1;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    transition: all 0.3s ease;
    display: block;
}

.icon-choice-option:hover {
    border-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.icon-choice-option.selected {
    border-color: var(--primary-color);
    background: rgba(35, 47, 159, 0.05);
    box-shadow: 0 2px 12px rgba(35, 47, 159, 0.2);
}

.icon-choice-option input[type="radio"] {
    display: none;
}

.icon-choice-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-choice-icon {
    font-size: 32px;
    line-height: 1;
}

.icon-choice-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.icon-choice-text strong {
    font-size: 16px;
    color: var(--text-color);
}

.icon-choice-text small {
    font-size: 13px;
    color: #666;
}

.custom-icon-upload {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.file-input {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-input:hover {
    border-color: var(--accent-color);
    background: rgba(89, 100, 166, 0.05);
}

.file-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.icon-preview-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: flex-end;
    margin-top: 20px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.icon-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.icon-preview-item img {
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: #f0f0f0;
    padding: 4px;
    display: block;
}

.icon-preview-item canvas {
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.icon-preview-item span {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.placeholder-icon-preview {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

/* Responsive icon upload */
@media (max-width: 600px) {
    .icon-choice-container {
        flex-direction: column;
    }
    
    .icon-preview-container {
        gap: 15px;
        padding: 15px;
    }
}

/* Test & Preview Section - Grid Layout like Hero */
.test-preview-section {
    padding: 30px 40px;
    background: linear-gradient(135deg, rgba(223, 225, 232, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
    border-radius: var(--border-radius);
}

.test-preview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    max-width: 1200px;
    margin: 0 auto;
}

/* Left Column - Text and Inputs (Scrollable) */
.test-preview-left {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 15px;
}

/* Custom scrollbar for left column */
.test-preview-left::-webkit-scrollbar {
    width: 8px;
}

.test-preview-left::-webkit-scrollbar-track {
    background: rgba(223, 225, 232, 0.3);
    border-radius: 4px;
}

.test-preview-left::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.test-preview-left::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.test-preview-left h2 {
    margin: 0;
    font-size: 1.8rem;
    border: none;
    padding: 0;
}

.preview-note {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
}

.preview-info {
    font-size: 0.95rem;
    margin: 0;
    padding: 12px;
    background: rgba(89, 100, 166, 0.1);
    border-left: 3px solid var(--accent-color);
    border-radius: 4px;
}

.test-inputs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

/* Right Column - Preview (Sticky/Centered) */
.test-preview-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 20px;
    align-self: start;
}

.preview-sticky-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.test-preview-right .browser-mockup {
    width: 100%;
    max-width: 650px;
}

.preview-update-btn {
    align-self: center;
    min-width: 200px;
    max-width: 300px;
}

/* Power Fx Section within Test & Preview */
.power-fx-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--secondary-color);
}

.power-fx-section h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.power-fx-section p {
    margin-bottom: 15px;
}

/* Browser mockup with sidebar */
.browser-mockup {
    position: relative;
    width: 100%;
    max-width: 600px;
    aspect-ratio: 512 / 512;
    background-image: url('Assets/browser-ui-svgrepo-com.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.browser-content {
    position: absolute;
    top: 23.4%;
    left: 15.6%;
    width: 68.8%;
    height: 43.75%;
    display: flex;
    background: #f0f0f0;
}

.browser-main-area {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.75rem;
    border-right: 1px solid #ddd;
}

.browser-sidebar {
    width: 40%;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: -2px 0 8px rgba(0,0,0,0.1);
}

/* Match template's toolbar exactly */
.browser-sidebar-toolbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 16px; /* Scaled down from 40px */
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    z-index: 1000;
    font-size: 8px;
}

.browser-toolbar-left {
    display: flex;
    align-items: center;
}

.browser-toolbar-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 7px;
    font-weight: 500;
    cursor: default;
}

.browser-toolbar-right {
    display: flex;
    align-items: center;
}

.browser-status-indicator {
    color: #28a745;
    font-size: 8px;
}

.browser-sidebar-content {
    position: absolute;
    top: 16px; /* Matches scaled toolbar height */
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    background: #ffffff;
}

.browser-sidebar iframe {
    width: 250%;
    height: 250%;
    border: none;
    transform: scale(0.4);
    transform-origin: 0 0;
}
.code-snippet-container { position: relative; background-color: #2d2d2d; color: #f1f1f1; border-radius: 4px; margin-top: 10px; font-family: "Consolas", "Monaco", monospace; }
.code-snippet-container pre { padding: 15px; margin: 0; white-space: pre-wrap; word-break: break-all; }
.copy-btn { position: absolute; top: 10px; right: 10px; padding: 5px 10px; background-color: #555; color: white; border: none; border-radius: 4px; cursor: pointer; }
.copy-btn:hover { background-color: #777; }

/* Post-Build Guide Styles */
.distro-tabs { display: flex; border-bottom: 2px solid var(--secondary-color); margin-bottom: 20px; }
.distro-tab-btn { padding: 10px 20px; cursor: pointer; border: none; background: none; font-size: 1rem; font-weight: 600; color: #666; border-bottom: 3px solid transparent; }
.distro-tab-btn.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
.distro-tab-content { display: none; }
.distro-tab-content.active { display: block; animation: fadeIn 0.5s; }

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

/* Space between wizard and author card */
burns-dev-card {
    margin-top: 30px;
    width: 100%;
    max-width: var(--container-width);
}