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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: white;
    min-height: 100vh;

}



.header {
    background: linear-gradient(45deg, #9ed1fe, #fc5160);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
}

.scanner-section {
    padding: 40px;
}

.upload-area {
    border: 3px dashed #3b82f6;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    background: #f8faff;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 20px;
}

.upload-area:hover {
    background: #f0f7ff;
    border-color: #2563eb;
}

.upload-area.dragover {
    background: #e0f2fe;
    border-color: #0891b2;
}



.file-input {
    display: none;
}



.controls {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: flex-start;
    max-width: 250px;
}

.control-group {
    background: #f8faff;
    padding: 20px;
    border-radius: 10px;
    flex: 1;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #425779;
}

.control-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
}

/*.advanced-controls {
    background: #f8faff;
    border-radius: 10px;
    padding: 15px;
    flex: 0 0 200px;
}

.advanced-controls summary {
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9em;
    margin-bottom: 10px;
}

.advanced-controls label {
    display: block;
    margin: 8px 0 4px;
    font-weight: 500;
    color: #6b7280;
    font-size: 0.85em;
}

.advanced-controls input[type="range"] {
    width: 100%;
    margin-bottom: 4px;
}

.advanced-controls span {
    font-size: 0.8em;
    color: #9ca3af;
}*/

.scan-btn {
    width: 100%;
    background: linear-gradient(45deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.scan-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.scan-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.results {
    margin-top: 30px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 15px;
    display: none;
}

.results.show {
    display: block;
}

.results h3 {
    margin-bottom: 20px;
    color: #1f2937;
    font-size: 1.4em;
}

.detected-pokemon {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.pokemon-source {
    font-size: 0.60em;
    color: #9fc2ff;
    font-weight: 370;
}

.pokemon-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pokemon-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(81, 226, 255, 0.078);
    border: none;
    border-radius: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 1.2em;
}

.pokemon-image {
    width: 50px;
    height: 50px;
    border-radius: 3px;
}

.pokemon-name {
    font-weight: 500;
    color: #374151;
}

.pokemon-number {
    font-size: 0.75em;
    color: #9ca3af;
    font-weight: 400;
}

.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.show {
    display: block;
}

.spinner {
    border: 4px solid #f3f4f6;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.error {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    color: #991b1b;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    display: none;
}

.error.show {
    display: block;
}



.stats-container {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-left: 4px solid #ccdfff;
}

.stat-card h4 {
    margin-bottom: 15px;
    color: #1f2937;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 8px 0;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 500;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-value {
    font-weight: 600;
    color: #1f2937;
}

.stat-bar {
    background: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
    width: 100px;
}

.stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9bc4ff, #fc5160);
    transition: width 0.5s ease;
}

.global-stat {
    background: white;
    color: black;
    border: 2px solid #8b8b8b; /* bordure grise douce */
    border-radius: 15px;       /* même arrondi que .stat-card */
    padding: 20px;             /* pour que le contenu ne touche pas la bordure */
    box-shadow: 0 4px 12px rgba(0,0,0,0.05); /* léger ombrage */
}

.global-stat .stat-label,
.global-stat .stat-value {
    color: black;
}

.gen-stat {
    border-left-color: #dacbff;
}

.type-stat {
    border-left-color: rgb(246, 251, 203)
}


.legendary-stat {
    border-left-color: #ffbcbc;
}

.starter-stat {
    border-left-color: #c7ffec;
}

.type-icon {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.type-details {
    margin-top: 10px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.9em;
}

.type-breakdown {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
}

#upload {
    width: 50px;
    margin: 20px;
}

#scanner_logo {
    width: 100px;
}
@media (max-width: 768px) {
   
    
    /* .advanced-controls {
        flex: 1;
    } */
    
    .scanner-section {
        padding: 20px;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 300px) {
 .controls {
        flex-direction: column;
 }}

 /* Styles pour le bouton PDF - à ajouter à la fin de votre CSS */

.pdf-download-container {
    margin-bottom: 20px;
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.pdf-download-btn {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pdf-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
    background: linear-gradient(135deg, #ff5252, #ffc107);
}

.pdf-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.3);
}

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

.pdf-download-btn.generating {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    cursor: wait;
}

.pdf-download-btn.generating::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 8px;
}





.image-queue {
        margin: 20px 0;
        padding: 15px;
        background: #f8faff;
        border-radius: 10px;
        display: none;
    }

.image-queue.show {
    display: block;
}

.queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.queue-count {
    font-weight: bold;
    color: #374151;
}

.clear-queue {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.image-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
}

.image-item.processing {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.image-item.completed {
    border-color: #10b981;
}

.image-item.error {
    border-color: #ef4444;
}

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

.image-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-status {
    position: absolute;
    bottom: 2px;
    left: 2px;
    font-size: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 4px;
    border-radius: 3px;
}


.progress-section {
    margin: 20px 0;
    display: none;
}

.progress-section.show {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: #374151;
}


.type-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.type-stat-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.type-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.type-label-with-icon {
    display: flex;
    align-items: center;
    gap: 8px;
}

.type-main-value {
    font-weight: 600;
    color: #1f2937;
}

.type-stat-bar {
    background: #e5e7eb;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    margin: 8px 0;
}

.type-stat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9bc4ff, #fc5160);
    transition: width 0.5s ease;
}

.type-details-compact {
    margin-top: 10px;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.85em;
}

.type-breakdown-compact {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
    font-size: 0.8em;
}


/* PokeBinderDex Promotion Styles */

/* Global statistics promotion */
.pokebinderdex-promotion {
    margin-top: 15px;
    padding: 15px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

.pokebinderdx-promotion:hover {
    transform: translateY(-2px);
}

.promotion-content {
    margin-bottom: 12px;
}

.promotion-icon {
    font-size: 1.5em;
    margin-right: 8px;
}

.promotion-text {
    font-weight: 600;
    font-size: 1.1em;
}

.promotion-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.promotion-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Different promotion themes based on progress */
.promotion-master {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #8b4513;
}

.promotion-master .promotion-link {
    background: rgba(139, 69, 19, 0.2);
    color: #8b4513;
}

.promotion-master .promotion-link:hover {
    background: rgba(139, 69, 19, 0.3);
}

.promotion-excellent {
    background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
}

.promotion-good {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

.promotion-start {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #2d3748;
}

.promotion-start .promotion-link {
    background: rgba(45, 55, 72, 0.2);
    color: #2d3748;
}

.promotion-beginner {
    background: linear-gradient(135deg, #d299c2 0%, #fef9d3 100%);
    color: #2d3748;
}

.promotion-beginner .promotion-link {
    background: rgba(45, 55, 72, 0.2);
    color: #2d3748;
}

/* Generation promotions */
.gen-promotion {
    margin-top: 8px;
    padding: 8px;
    background: rgba(103, 127, 234, 0.1);
    border-radius: 6px;
    text-align: center;
}

.gen-promo-text {
    display: block;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 5px;
}

.gen-promo-link {
    font-size: 0.85em;
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.gen-promo-link:hover {
    text-decoration: underline;
}

.generation-overall-promotion {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    text-align: center;
    color: white;
}

.promo-highlight {
    margin-bottom: 10px;
    font-size: 1.05em;
}

.generation-promo-link {
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.generation-promo-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Type promotions - colors are now dynamically set in JavaScript */
.type-promotion-header {
    margin-bottom: 15px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.type-promotion-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    animation: typeShine 4s infinite;
}

@keyframes typeShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.favorite-type-highlight {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.favorite-type-icon {
    width: 25px;
    height: 25px;
    border-radius: 3px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.type-analysis-link {
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    display: inline-block;
}

.type-analysis-link:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Special Pokemon promotions */
.special-promotion {
    margin-top: 8px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
}

.legendary-master {
    background: linear-gradient(135deg, #ffd700 0%, #ffb347 100%);
    color: #8b4513;
}

.legendary-hunter {
    background: linear-gradient(135deg, #dda0dd 0%, #da70d6 100%);
    color: #4b0082;
}

.starter-master {
    background: linear-gradient(135deg, #90ee90 0%, #32cd32 100%);
    color: #006400;
}

.starter-fan {
    background: linear-gradient(135deg, #87ceeb 0%, #4682b4 100%);
    color: #191970;
}

.special-promo-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-top: 5px;
    opacity: 0.8;
}

.special-promo-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Call-to-action card */
.cta-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    text-align: center;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cta-icon {
    font-size: 1.5em;
}

.cta-header h4 {
    color: white;
    margin: 0;
}

.cta-description {
    margin-bottom: 20px;
    opacity: 0.9;
    line-height: 1.5;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-primary, .cta-secondary {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
    
    .pokebinderdex-promotion {
        padding: 12px;
    }
    
    .promotion-text {
        font-size: 1em;
    }
}

/* Special stat card styling */
.special-stat {
    border-left-color: #fbbf24;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

/* Animation for promotions */
.pokebinderdex-promotion, .generation-overall-promotion, .type-promotion-header {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* Compact Tutorial Styles with Video Support */

.tutorial-compact {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    margin: 0 20px 20px 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
    border: none;
    position: relative;
}

.tutorial-toggle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.tutorial-toggle-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tutorial-toggle-header:hover {
    background: rgba(255, 255, 255, 0.25);
}

.tutorial-toggle-header:hover::after {
    width: 80%;
}

.tutorial-title {
    font-weight: 700;
    color: white;
    font-size: 1.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tutorial-arrow {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.tutorial-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.tutorial-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
}

.tutorial-content.expanded {
    max-height: 1200px;
    opacity: 1;
}

/* New: Main container for tutorial content with video */
.tutorial-main-container {
    display: flex;
    gap: 30px;
    padding: 25px;
    align-items: flex-start;
}

.tutorial-steps-compact {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* New: Video container styles */
.tutorial-video-container {
    flex-shrink: 0;
    width: 560px;
    max-width: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    position: relative;
}

.tutorial-video {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    background: #000;
}

.tutorial-video:hover {
    transform: scale(1.04);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.step-item::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.6s ease;
}

.step-item:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.15);
}

.step-item:hover::before {
    left: 100%;
}

.step-num {
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
    position: relative;
    z-index: 1;
}

.step-text {
    color: #334155;
    font-size: 0.95em;
    line-height: 1.5;
    margin-top: 3px;
    font-weight: 500;
}

.tutorial-tip {
    margin: 0 25px 25px 25px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #fef3c7, #fbbf24);
    border-radius: 12px;
    font-size: 0.95em;
    color: #92400e;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.tutorial-tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-20deg);
    animation: tipShine 3s ease-in-out infinite;
}

@keyframes tipShine {
    0% { left: -60%; }
    50% { left: 120%; }
    100% { left: 120%; }
}

/* Arrow rotation when expanded */
.tutorial-compact.expanded .tutorial-arrow {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.4);
}

/* Staggered animation for step items when expanding */
.tutorial-content.expanded .step-item {
    animation: slideInUp 0.5s ease-out both;
}

.tutorial-content.expanded .step-item:nth-child(1) { animation-delay: 0.1s; }
.tutorial-content.expanded .step-item:nth-child(2) { animation-delay: 0.15s; }
.tutorial-content.expanded .step-item:nth-child(3) { animation-delay: 0.2s; }
.tutorial-content.expanded .step-item:nth-child(4) { animation-delay: 0.25s; }
.tutorial-content.expanded .step-item:nth-child(5) { animation-delay: 0.3s; }
.tutorial-content.expanded .step-item:nth-child(6) { animation-delay: 0.35s; }
.tutorial-content.expanded .step-item:nth-child(7) { animation-delay: 0.4s; }
.tutorial-content.expanded .step-item:nth-child(8) { animation-delay: 0.45s; }

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

/* Mobile responsiveness */
@media (max-width: 768px) {
    .tutorial-compact {
        margin: 0 15px 15px 15px;
    }
    
    .tutorial-toggle-header {
        padding: 12px 15px;
    }
    
    .tutorial-title {
        font-size: 0.9em;
    }
    
    /* Mobile: Stack video below steps */
    .tutorial-main-container {
        flex-direction: column;
        gap: 20px;
        padding: 15px;
        align-items: center;
    }
    
    .tutorial-video-container {
        width: 100%;
        max-width: 280px;
        order: 2;
    }
    
    .tutorial-steps-compact {
        gap: 10px;
        order: 1;
    }
    
    .step-item {
        padding: 8px;
    }
    
    .step-num {
        width: 20px;
        height: 20px;
        font-size: 0.75em;
    }
    
    .step-text {
        font-size: 0.9em;
    }
    
    .tutorial-tip {
        margin: 0 15px 15px 15px;
        padding: 10px 12px;
        font-size: 0.85em;
    }
}

@media (max-width: 480px) {
    .tutorial-compact {
        margin: 0 10px 10px 10px;
    }
    
    .step-item {
        gap: 8px;
    }
    
    .step-text {
        font-size: 0.85em;
    }
    
    .tutorial-video-container {
        max-width: 240px;
    }
}
