/* Improved styling for better readability and visual appeal */
#statusMessage {
    position: fixed;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    padding: 1.2vh 1.2vw;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 0.5vw;
    font-size: 1em;
    transition: all 0.2s ease;
    transform: translateY(-0.1vh);
}

#autoplayButton:active {
    transform: translateY(0);
    max-width: 80vw;
    text-align: center;
}

.reveal .slides {
    text-align: left;
    font-size: 1em;
    line-height: 1.3em;
}

.reveal h1,
.reveal h2,
.reveal h3 {
    text-transform: none;
    margin-bottom: 0.3em;
    color: #42affa;
    text-shadow: 0.15vw 0.15vw 0.3vw rgba(0, 0, 0, 0.5);
}

.reveal .slides section {
    height: auto;
    min-height: 0;
    max-height: 100%;
    box-sizing: border-box;
    padding: clamp(0.5em, 2vw, 1.5em);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.reveal .progress {
    color: #42affa;
}

.reveal ul,
.reveal ol {
    margin-left: 1em;
    margin-bottom: 0.5em;
}

.reveal li {
    margin-bottom: 0.3em;
}

.reveal .columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.reveal .column {
    flex: 1;
    padding: 0 1em;
    min-width: 18vw;
}

.reveal .highlight {
    color: #42affa;
    font-weight: bold;
    text-shadow: 0.08vw 0.08vw 0.15vw rgba(0, 0, 0, 0.3);
}

.reveal .footer {
    position: absolute;
    bottom: 1em;
    left: 1em;
    font-size: 0.5em;
    color: #888;
}

.reveal {
    position: relative;
    overflow: hidden;
    border-radius: 0.5vw;
    box-shadow: 0 0 1vw rgba(0, 0, 0, 0.3);
}

.reveal pre {
    width: 100%;
    max-height: 40vh;
    overflow-y: auto;
    padding: 0.8vh 1vw;
}

.reveal pre code {
    padding: 0.8vh 1vw;
    font-size: 0.85em;
}

#controlsContainer {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 1.2vh 1.2vw;
    border-radius: 0.5vw;
    box-shadow: 0 0 1vw rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#controlsHoverZone {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5vh;
    z-index: 999;
}

#controlsHoverZone:hover+#controlsContainer,
#controlsContainer:hover {
    opacity: 1;
    pointer-events: auto;
}

#autoplayButton {
    padding: 1.2vh 2.4vw;
    background-color: #42affa;
    color: white;
    border: none;
    border-radius: 0.5vw;
    cursor: pointer;
    font-size: 1em;
    margin-right: 1vw;
    transition: background-color 0.3s ease;
}

#autoplayButton:hover {
    background-color: #2980b9;
}

#voiceSelect {
    padding: 0.6vh 0.6vw;
    font-size: 0.9em;
    cursor: pointer;
    min-width: 12vw;
}

#voiceSelect:hover {
    background: rgba(26, 26, 46, 1);
    border-color: #667eea;
    background-color: #42affa;
    color: white;
    border: none;
    border-radius: 0.5vw;
    cursor: pointer;
}

/* Responsive design improvements */
@media (max-width: 768px) {
    .reveal .slides {
        font-size: 0.8em;
    }


    /* Screen reader only content */
    .sr-only {
        position: absolute;
        width: 0.08vw;
        height: 0.1vh;
        padding: 0;
        margin: -0.1vh;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border-width: 0;
    }

    /* Focus visible styles for keyboard navigation */
    button:focus-visible,
    select:focus-visible,
    a:focus-visible {
        outline: 0.3vw solid #64ffda;
        outline-offset: 0.2vw;
    }

    #controlsContainer {
        align-items: center;
        flex-direction: column;
        align-items: stretch;
    }

    #autoplayButton,
    #voiceSelect {
        margin-bottom: 1.2vh;
    }
}

/* Custom Presentation Styles */

/* Title Slide Enhancements */
.reveal section:first-of-type h1 {
    border-left: 8px solid #42affa;
    padding-left: 25px;
    text-align: left;
}

.reveal section:first-of-type p {
    font-size: 1.4em;
    color: #ccc;
    margin-top: 0;
    font-weight: 300;
}

/* KPI Card Styling */
/* Targets the KPI slide specifically to create a dashboard feel */
[data-auto-animate] .columns .column.fragment {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(66, 175, 250, 0.15);
    border-radius: 12px;
    padding: 1.5em 1em;
    margin: 0.5em;
    text-align: center;
    transition: all 0.4s ease;
}

[data-auto-animate] .columns .column.fragment:hover {
    background: rgba(66, 175, 250, 0.08);
    border-color: #42affa;
    transform: translateY(-5px);
}

.reveal .highlight {
    font-size: 1.2em;
    letter-spacing: 0.05em;
}

/* List Styling Enhancements */
.reveal ul {
    list-style-type: none;
}

.reveal ul li::before {
    content: "→";
    color: #42affa;
    font-weight: bold;
    display: inline-block;
    width: 1.5em;
    margin-left: -1.5em;
}

/* Challenges & Mitigations Slide */
/* Adds visual separation between Obstacles and Actions */
section[data-scale="1.4"] .column:first-child {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

section[data-scale="1.4"] h3 {
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.1em;
    margin-bottom: 1em;
}

/* Roadmap Slide Styling */
section[data-scale="1.5"] .column h3 {
    border-bottom: 2px solid rgba(66, 175, 250, 0.3);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* Goal Highlight Box */
.reveal p.highlight[style*="text-align: center"] {
    background: rgba(66, 175, 250, 0.1);
    padding: 0.8em;
    border-radius: 8px;
    border: 1px dashed #42affa;
    display: block;
    width: fit-content;
    margin: 1.5em auto 0;
}

/* Conclusion Slide */
.reveal section:last-of-type h2 {
    color: #fff;
    font-weight: 700;
}

.reveal section:last-of-type h3 {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Scrollbar for overflow content */
.reveal .slides section::-webkit-scrollbar {
    width: 6px;
}

.reveal .slides section::-webkit-scrollbar-thumb {
    background: rgba(66, 175, 250, 0.3);
    border-radius: 10px;
}