:root {
    --background: 220 20% 98%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 262 83% 58%;
    --primary-secondary: 249 100% 64%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 262 83% 58%;
    --radius: 0.75rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Page load animation */
@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply page load animation to main sections */
.hero,
.main-grid,
.how-it-works,
.content-section {
    animation: pageLoad 0.8s ease-out;
}

/* Stagger animation delays */
.main-grid {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.how-it-works {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.content-section {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

/* Scroll reveal animation */
@keyframes scrollReveal {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection styling */
::selection {
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--primary));
}

::-moz-selection {
    background: hsl(var(--primary) / 0.2);
    color: hsl(var(--primary));
}

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(220 25% 95%) 50%, hsl(240 30% 92%) 100%);
    background-attachment: fixed;
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, hsl(262 83% 58% / 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, hsl(249 100% 64% / 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, hsl(220 100% 70% / 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.font-space-grotesk {
    font-family: 'Space Grotesk', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    border-bottom: 1px solid hsl(var(--border) / 0.3);
    background: linear-gradient(135deg, hsl(var(--card) / 0.8) 0%, hsl(var(--card) / 0.6) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header:hover {
    box-shadow: var(--shadow-md);
    border-bottom-color: hsl(var(--primary) / 0.2);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem;
    border-radius: var(--radius);
}

.logo:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary-secondary) / 0.1) 100%);
}

.logo h1, .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-secondary)) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: hsl(var(--foreground));
}

.nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.nav a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--primary-secondary) / 0.1) 100%);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.nav a:hover {
    color: hsl(var(--primary));
    transform: translateY(-1px);
}

.nav a:hover::before {
    left: 0;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

/* Hero Section */
.hero {
    padding: 4rem 1rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 1rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, 
        hsl(var(--primary) / 0.05) 0deg, 
        hsl(var(--primary-secondary) / 0.05) 120deg, 
        hsl(var(--primary) / 0.05) 240deg, 
        hsl(var(--primary-secondary) / 0.05) 360deg);
    animation: rotate 20s linear infinite;
    z-index: -1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

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

@media (max-width: 768px) {
    .hero {
        padding: 2rem 1rem 1rem;
        margin-top: 0;
    }
}

.hero h1, .hero h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
    line-height: 1.2;
}

.hero .highlight {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-secondary)) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    display: inline-block;
}

.hero .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-secondary)) 100%);
    border-radius: 2px;
    animation: pulse 2s ease-in-out infinite;
}

.hero p {
    font-size: 1.125rem;
    color: hsl(var(--muted-foreground));
    max-width: 48rem;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .hero h1, .hero h2 {
        font-size: 3.5rem;
    }
    .hero p {
        font-size: 1.25rem;
    }
}

/* Status Message */
#status {
    font-size: 1.25rem;
    color: hsl(var(--primary));
    margin: 1rem 0;
    font-weight: 500;
}

/* Control Panel */
.control-panel {
    background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--card) / 0.95) 100%);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2rem;
    margin: 1.5rem auto;
    max-width: 42rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.control-panel:hover {
    box-shadow: var(--shadow-lg);
    border-color: hsl(var(--primary) / 0.2);
}

.control-panel h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    min-width: 100px;
    flex-shrink: 0;
}

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid hsl(var(--border) / 0.5);
    border-radius: calc(var(--radius) * 1.2);
    background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--background) / 0.95) 100%);
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 80px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.form-control:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-md), 0 0 0 3px hsl(var(--primary) / 0.1);
    transform: translateY(-1px);
    background: hsl(var(--background));
}

.form-control:hover:not(:focus) {
    border-color: hsl(var(--border));
    box-shadow: var(--shadow);
}

/* Upload and Result Grid */
.main-grid {
    display: grid;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
    /* Ensure content is not hidden behind header on mobile */
    scroll-margin-top: 4rem;
}

@media (min-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.card {
    background: linear-gradient(135deg, hsl(var(--card)) 0%, hsl(var(--card) / 0.95) 100%);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scroll-margin-top: 5rem;
    overflow-x: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.02) 0%, hsl(var(--primary-secondary) / 0.02) 100%);
    border-radius: calc(var(--radius) * 1.5);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: hsl(var(--primary) / 0.2);
}

.card:hover::before {
    opacity: 1;
}

@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
        margin-left: 0.5rem;
        margin-right: 0.5rem;
    }
}

.upload-area {
    border: 2px dashed hsl(var(--border) / 0.6);
    border-radius: calc(var(--radius) * 1.5);
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, hsl(var(--secondary) / 0.3) 0%, hsl(var(--secondary) / 0.1) 100%);
    position: relative;
    overflow: hidden;
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.05) 0%, hsl(var(--primary-secondary) / 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.upload-area:hover {
    border-color: hsl(var(--primary) / 0.8);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.upload-area:hover::before {
    opacity: 1;
}

.upload-area.has-image img {
    max-width: 100%;
    height: 16rem;
    object-fit: contain;
    margin: 0 auto;
    border-radius: var(--radius);
}
.upload-area img {
    max-width: 500px;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-placeholder p {
    margin: 0;
}

.upload-placeholder .main-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.upload-placeholder .sub-text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.hidden {
    display: none !important;
}

/* Canvas Styles */
.canvas-container {
    margin: 1rem 0;
    text-align: center;
    /* Add scroll margin for mobile */
    scroll-margin-top: 5rem;
}

.canvas-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

canvas {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    /* border: 1px solid hsl(var(--border)); */
    background-color: white;
    display: block;
    margin: 0 auto;
    /* Ensure canvas maintains aspect ratio */
    object-fit: contain;
}

/* Mobile specific canvas adjustments */
@media (max-width: 768px) {
    canvas {
        max-width: calc(100vw - 3rem);
        width: 100%;
        height: auto;
        /* Maintain square aspect ratio on mobile */
        aspect-ratio: 1 / 1;
    }
    
    /* Ensure canvas containers don't overflow on mobile */
    .canvas-container {
        overflow-x: hidden;
        padding: 0.5rem;
    }
    
    /* Result card specific adjustments */
    #resultCard {
        overflow-x: hidden;
    }
    
    #canvasOutput2, #canvasOutput3 {
        /* Force square display on mobile */
        width: 100%;
        max-width: min(calc(100vw - 3rem), 500px);
        height: auto;
    }
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: calc(var(--radius) * 1.5);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-secondary)) 100%);
    color: hsl(var(--primary-foreground));
    border: 1px solid hsl(var(--primary) / 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, hsl(var(--primary) / 0.9) 0%, hsl(var(--primary-secondary) / 0.9) 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, hsl(var(--secondary)) 0%, hsl(var(--muted)) 100%);
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, hsl(var(--secondary) / 0.9) 0%, hsl(var(--muted) / 0.9) 100%);
    border-color: hsl(var(--primary) / 0.3);
}

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

.btn:disabled:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.btn-full {
    width: 100%;
    margin-top: 1.5rem;
}

.btn-hero {
    font-size: 1.125rem;
    padding: 1.25rem 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(var(--primary-secondary)) 50%, hsl(var(--primary)) 100%);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    box-shadow: var(--shadow-lg);
    border: 2px solid hsl(var(--primary) / 0.3);
}

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

.btn-hero:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: hsl(var(--primary) / 0.5);
}

.btn-group {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .btn-group {
        gap: 0.5rem;
    }
    
    .btn-group .btn {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 120px;
        padding: 0.65rem 1rem;
        font-size: 0.8rem;
    }
}

/* Text Area */
.pins-textarea {
    width: 100%;
    min-height: 150px;
    padding: 1.25rem;
    border: 2px solid hsl(var(--border) / 0.5);
    border-radius: calc(var(--radius) * 1.2);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.875rem;
    resize: vertical;
    background: linear-gradient(135deg, hsl(var(--secondary) / 0.8) 0%, hsl(var(--secondary) / 0.6) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    line-height: 1.6;
}

.pins-textarea:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: var(--shadow-md), 0 0 0 3px hsl(var(--primary) / 0.1);
    background: hsl(var(--secondary) / 0.9);
}

.pins-textarea:hover:not(:focus) {
    border-color: hsl(var(--border));
    box-shadow: var(--shadow);
}

@media (max-width: 768px) {
    .pins-textarea {
        font-size: 0.75rem;
        padding: 1rem;
        min-height: 120px;
    }
}

/* Info Text */
.info-text {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin: 1rem 0;
    line-height: 1.5;
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 1rem;
    background: linear-gradient(135deg, hsl(var(--card) / 0.4) 0%, hsl(var(--secondary) / 0.2) 100%);
    position: relative;
    overflow: hidden;
}

.how-it-works::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, hsl(var(--primary) / 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, hsl(var(--primary-secondary) / 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.how-it-works h3 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    gap: 2rem;
    max-width: 64rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step {
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem;
    border-radius: calc(var(--radius) * 1.5);
    position: relative;
}

.step:hover {
    transform: translateY(-8px);
    background: linear-gradient(135deg, hsl(var(--card) / 0.8) 0%, hsl(var(--card) / 0.6) 100%);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.step-icon {
    width: 4.5rem;
    height: 4.5rem;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--primary-secondary) / 0.15) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid hsl(var(--primary) / 0.2);
    box-shadow: var(--shadow-md);
}

.step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, hsl(var(--primary) / 0.25) 0%, hsl(var(--primary-secondary) / 0.25) 100%);
    border-color: hsl(var(--primary) / 0.4);
    box-shadow: var(--shadow-lg);
}

.step h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.step p {
    color: hsl(var(--muted-foreground));
}

/* Gallery Section */
.gallery {
    padding: 5rem 1rem;
}

.gallery h3 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-item {
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    transition: box-shadow 0.2s;
}

.gallery-item:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* Footer */
.footer {
    background-color: hsl(var(--card) / 0.5);
    border-top: 1px solid hsl(var(--border));
    padding: 3rem 1rem;
    margin-top: 5rem;
}

.footer-content {
    text-align: center;
    max-width: 64rem;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer p {
    color: hsl(var(--muted-foreground));
    max-width: 42rem;
    margin: 0 auto 1.5rem;
}

/* Animations */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Draw Status */
#drawStatus {
    font-size: 0.875rem;
    color: hsl(var(--primary));
    margin: 0.5rem 0;
}

/* Step Counter */
#incrementalCurrentStep {
    font-size: 1.125rem;
    font-weight: 600;
    color: hsl(var(--foreground));
    margin: 1rem 0;
}

/* Demo Slideshow Styles */
.demo-card {
    text-align: center;
}

.demo-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: hsl(var(--foreground));
}

.demo-video-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.demo-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background-color: #f8f9fa;
}

.demo-video {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    background-color: #f8f9fa;
    border-radius: var(--radius);
}

.demo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 1.5rem 1rem 1rem;
    margin: 0;
    font-weight: 500;
    font-size: 1.125rem;
}



/* Slide Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Demo */
@media (max-width: 768px) {
    /* Mobile adjustments for main grid */
    .main-grid {
        margin-top: 1rem;
    }
    
    .demo-video-container {
        max-width: 100%;
        margin: 0 auto 1rem;
    }
    
    .demo-image,
    .demo-video {
        height: auto;
        max-height: 400px;
    }
    
    .demo-title {
        font-size: 1.5rem;
    }
    
    .demo-caption {
        font-size: 1rem;
        padding: 1rem 0.75rem 0.75rem;
    }
}

/* Content Sections */
.content-section {
    padding: 4rem 1rem;
}

.content-section.bg-muted {
    background-color: hsl(var(--muted) / 0.3);
}

.content-text {
    max-width: 100%;
    margin: 0 auto;
    line-height: 1.8;
    margin-top: 1rem;
}

.content-text p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    color: hsl(var(--foreground));
}

/* HowTo Styles */
.howto-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .howto-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.howto-materials,
.howto-safety {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
}

.howto-materials h4,
.howto-safety h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.materials-list,
.safety-list {
    list-style: none;
    padding: 0;
}

.materials-list li,
.safety-list li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
}

.materials-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: hsl(var(--primary));
    font-weight: bold;
}

.safety-list li::before {
    content: "⚠";
    position: absolute;
    left: 0;
    color: hsl(var(--destructive));
}

.safety-box {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: hsl(var(--destructive) / 0.1);
    border: 1px solid hsl(var(--destructive) / 0.2);
    border-radius: var(--radius);
    padding: 1rem;
}

/* Detailed Steps */
.steps-detailed {
    margin-top: 3rem;
}

.steps-detailed h4 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.step-detailed {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.step-content h5 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.step-content p {
    color: hsl(var(--muted-foreground));
    line-height: 1.6;
}

/* Difficulty Cards */
.difficulty-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .difficulty-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.difficulty-card {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 2px 4px 0 rgb(0 0 0 / 0.1);
}

.difficulty-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.difficulty-header.beginner {
    background-color: hsl(120, 60%, 95%);
    border-bottom: 2px solid hsl(120, 60%, 80%);
}

.difficulty-header.intermediate {
    background-color: hsl(45, 60%, 95%);
    border-bottom: 2px solid hsl(45, 60%, 80%);
}

.difficulty-header.advanced {
    background-color: hsl(0, 60%, 95%);
    border-bottom: 2px solid hsl(0, 60%, 80%);
}

.difficulty-header h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: white;
}

.beginner .difficulty-badge {
    background-color: hsl(120, 60%, 50%);
}

.intermediate .difficulty-badge {
    background-color: hsl(45, 60%, 50%);
}

.advanced .difficulty-badge {
    background-color: hsl(0, 60%, 50%);
}

.difficulty-content {
    padding: 1.5rem;
}

.difficulty-content p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.difficulty-content ul {
    list-style: none;
    padding: 0;
}

.difficulty-content li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.875rem;
}

.difficulty-content li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: hsl(var(--primary));
    font-weight: bold;
}

/* Tips Section */
.tips-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: hsl(var(--secondary) / 0.5);
    border-radius: var(--radius);
}

.tips-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tips-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .tips-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.tip {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.tip p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Troubleshooting */
.troubleshoot-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .troubleshoot-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.troubleshoot-item {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
}

.troubleshoot-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: hsl(var(--foreground));
}

.issue {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: hsl(var(--muted) / 0.5);
    border-left: 3px solid hsl(var(--primary));
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Credits & License */
.credits-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .credits-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.credits-section {
    background-color: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 2rem;
}

.credits-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(var(--foreground));
}

.credits-section p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

.credits-list,
.improvements-list {
    list-style: none;
    padding: 0;
}

.credits-list li,
.improvements-list li {
    margin-bottom: 0.75rem;
    padding-left: 1rem;
    position: relative;
    font-size: 0.875rem;
    line-height: 1.5;
}

.credits-list li::before,
.improvements-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: hsl(var(--primary));
    font-weight: bold;
}

.license-box {
    background-color: hsl(var(--secondary) / 0.5);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1rem;
}

.license-box p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

/* Responsive Navigation */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .content-section {
        padding: 2rem 1rem;
    }
    
    .howto-grid,
    .difficulty-grid,
    .troubleshoot-grid,
    .credits-grid {
        grid-template-columns: 1fr;
    }
    
    .step-detailed {
        flex-direction: column;
        text-align: center;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
}