.intro-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    z-index: 1000;
    overflow: hidden;
}

.intro-slides {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.intro-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease-in-out;
}

.intro-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.intro-slide.prev {
    transform: translateX(-100%);
}

.intro-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

.intro-text {
    font-size: 1.1rem;
    color: #666;
    text-align: center;
    line-height: 1.5;
    margin-bottom: 2rem;
    max-width: 90%;
}

.concept-button {
    position: relative;
    display: inline-flex; 
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    min-width: 80px;
    max-width: 200px;
    background: #D7D7D7;
    text-overflow: ellipsis;
    word-break: normal;
    word-wrap: normal; 
    padding: 8px 12px;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
    border-radius: none;
    cursor: grab;
    transition: all 0.2s ease-in-out;
    user-select: none;
    box-sizing: border-box;
}

.start-concept {
    background-color: #fb923c;
    color: white;
}

.end-concept {
    background-color: #4ade80;
    color: white;
}

.intermediate {
    background-color: #e9e9e9;
    color: #333;
    border: 1px solid #ccc;
}

/* ========= Styles for Intro Slide 1 ========== */

.concepts-layout-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 450px;
    margin: 1rem auto 0;
}

.concepts-layout-wrapper > * {
    position: absolute;
}

.concept-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.concept-group-title {
    font-size: 1rem;
    color: #000000;
    margin-bottom: 0.2rem;
    font-weight: 500;
}

#intro-start-group { top: 5%; left: 5%; }
#intro-end-group { bottom: 5%; right: 5%; }
#intro-nashville { top: 25%; left: 20%; transform: rotate(-5deg); }
#intro-lgbtq { top: 20%; right: 35%; transform: rotate(4deg); }
#intro-country { top: 40%; left: 35%; transform: rotate(6deg); }
#intro-nutella { top: 35%; right: 20%; transform: rotate(0deg); }
#intro-horse { top: 58%; right: 40%; transform: rotate(-5deg); }
#intro-chariot { top: 70%; left: 15%; transform: rotate(3deg); }
#intro-kentucky { bottom: 20%; left: 45%; transform: rotate(-2deg); }

/* ========= Styles for Intro Slide 2 ========== */
.connection-example {
    display: flex;
    align-items: center;
    justify-content: center;
    
    margin-top: 2rem;
}
[data-slide="1"] .concept-button {
    position: relative;
    display: inline-flex; 
    white-space: nowrap;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 80px;
    max-width: 200px;
    padding: 8px 12px;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
    font-weight: 500;
    border-radius: none;
    cursor: grab;
    transition: all 0.2s ease-in-out;
    user-select: none;
    box-sizing: border-box;
    text-overflow: ellipsis;
    word-break: normal;
    word-wrap: normal;
}

[data-slide="1"] .start-concept {
    background-color: #fb923c;
    color: white;
}

[data-slide="1"] .intermediate {
    background-color: #e9e9e9;
    color: #333;
    border: 1px solid #ccc;
}

/* ========= Styles for Intro Slide 3  ========== */

[data-slide="2"] .intro-text {
    max-width: 450px; 
}

.slide3-example-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 2rem;
    width: 100%;
    max-width: 320px;
}

.wiki-info-box {
    position: relative;
    background-color: #ffffff;
    border: 1.5px solid #000000;
    padding: 1rem;
    margin-bottom: 1.5rem;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.wiki-info-box::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #3f3e3e;
}

.wiki-text {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.4;
    margin: 0;
    text-align: left;
}


/* ========= Navigation and Buttons ========== */

.intro-dots {
    position: absolute;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: #333;
    transform: scale(1.2);
}

.start-game-btn {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.start-game-btn.visible {
    opacity: 1;
    pointer-events: all;
}

.start-game-btn:hover {
    background-color: #0056b3;
    transform: translateX(-50%) scale(1.05);
}

.hidden {
    display: none !important;
}

/* ========= Responsive Design ========== */
/* Responsive Design for Intro */
@media (max-width: 768px) {
    .intro-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .intro-text {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .concept-example {
        max-width: 350px;
        margin-bottom: 1.5rem;
    }
    
    .concept-button {
        padding: 0.7rem 1rem;
        font-size: 0.8rem;
        min-width: 100px;
    }
    
    .intermediate-concepts {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.6rem;
        max-width: 350px;
    }
    
    .rules-container {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .rule {
        padding: 0.8rem;
    }
    
    .rule p {
        font-size: 0.9rem;
    }
    
    .empty-slot {
        width: 100px;
        height: 35px;
    }
    
    .intro-dots {
        bottom: 100px;
    }
    
    .start-game-btn {
        bottom: 50px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    .connection-example {
        gap: 0.2rem;
    }
    
}

@media (max-width: 480px) {
    .intro-slide {
        padding: 1.5rem 1rem;
    }
    
    .intro-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .intro-text {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
    }
    
    .concept-example {
        max-width: 300px;
        margin-bottom: 1.2rem;
    }
    
    .concept-section h3 {
        font-size: 0.8rem;
    }
    
    .concept-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.75rem;
        min-width: 80px;
    }
    
    .intermediate-concepts {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 0.5rem;
        max-width: 300px;
    }
    
    .connection-example {
        gap: 0.1rem;
        margin-top: 1.5rem;
    }
    
    .connection-line {
        width: 40px;
    }
    
    .rules-container {
        gap: 0.8rem;
        margin-bottom: 1.2rem;
    }
    
    .rule {
        padding: 0.7rem;
    }
    
    .rule p {
        font-size: 0.85rem;
    }
    
    .empty-slot {
        width: 80px;
        height: 30px;
    }
    
    .intro-dots {
        bottom: 80px;
    }
    
    .start-game-btn {
        bottom: 40px;
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }
}
