/* The Last Trace - Optimized Styles */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Georgia, serif;
    background: #000;
    background-image: url('./images/background2.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    line-height: 1.5;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Main container */
.story-container {
    max-width: 100vw;
    width: 90vw;
    margin: 0 auto;
    padding: 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Passage content */
.passage {
    position: relative;
    text-align: center;
    font-size: 1.5em;
    line-height: 1.5em;
    flex: 1;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #e986ff;
}

/* Images */
.passage img {
    max-width: 100%;
    height: auto;
    margin: 20px auto;
    display: block;
    margin-bottom: 40px;
}

/* Text styling */
.text-magenta {
    color: #e986ff;
}

.text-cyan {
    color: #00ffcc;
}

.text-red {
    color: #ff0000;
}

.text-yellow {
    color: #ffff00;
}

.text-purple {
    color: #800080;
}

.text-bold {
    font-weight: bold;
}

.text-italic {
    font-style: italic;
}

.text-underline {
    text-decoration: underline;
}

/* Navigation container */
.nav-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    margin-top: 20px;
    opacity: 1;
    transition: opacity 0.5s ease-in;
    width: 100%;
}

.nav-container.visible {
    opacity: 1;
}

/* Buttons and links */
.story-link, .nav-link {
    display: inline-block;
    padding: 12px 24px;
    margin: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #e986ff;
    text-decoration: none;
    border: 2px solid #e986ff;
    border-radius: 5px;
    font-size: 1rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 150px;
    height: 48px;
    line-height: 24px;
    box-sizing: border-box;
    text-align: center;
}

/* Choice buttons (story links) */
.story-link {
    background: rgba(0, 0, 0, 0.8);
    color: #e986ff;
    border-color: #e986ff;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

/* Choice container for inline choices */
.choice-container {
    margin: 20px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Choice buttons that appear inline with content */
.choice-button {
    background: rgba(0, 0, 0, 0.9);
    color: #e986ff;
    border: 2px solid #e986ff;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    min-width: 150px;
    height: 48px;
    line-height: 24px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 0 10px rgba(233, 134, 255, 0.3);
    transition: all 0.3s ease;
}

.choice-button:hover {
    background: #e986ff;
    color: #000;
    box-shadow: 0 0 20px rgba(233, 134, 255, 0.6);
    transform: translateY(-2px);
}

.story-link:hover, .nav-link:hover {
    background: #e986ff;
    color: #000;
}

/* Audio Controls */
.audio-controls {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #e986ff;
    border-right: none;
    border-radius: 10px 0 0 10px;
    padding: 10px 5px;
    color: #e986ff;
    font-size: 0.8em;
    z-index: 1000;
    transition: all 0.3s ease;
    width: 50px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

/* Audio controls always visible - removed closed state */

#story-menu {
    font-weight: bold;
    text-align: center;
    font-size: 0.7em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    margin-bottom: 5px;
}

#vol-title {
    font-size: 1em;
    margin-bottom: 65px;
}

#audio-volume-spacing {
    padding-bottom: 60px;
}
#audio-volume {
    width: 150px;
    height: 20px;
    margin: 5px 0;
    accent-color: #e986ff;
    transform: rotate(-90deg);
    transform-origin: center;
}

.audio-play {
    display: block;
    text-decoration: none;
    color: #e986ff;
    text-align: center;
    padding: 3px 6px;
    border: 1px solid #e986ff;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 0.7em;
    margin-bottom: 5px;
    display: none;
}

.audio-play:hover {
    background: rgba(233, 134, 255, 0.2);
}

.audio-mute {
    display: block;
    text-decoration: none;
    color: #800080;
    text-align: center;
    padding: 3px 6px;
    border: 1px solid #800080;
    border-radius: 3px;
    transition: all 0.3s ease;
    font-size: 0.7em;
}

.audio-mute:hover {
    background: #e986ff;
    color: #000;
}

.audio-mute.muted {
    background: #ff0000;
    color: #fff;
    border-color: #ff0000;
}

.audio-panel-toggle {
    position: absolute;
    top: 50%;
    left: -15px;
    transform: translateY(-50%);
    width: 15px;
    height: 30px;
    background: #e986ff;
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.audio-panel-toggle:hover {
    background: #fff;
}

.audio-panel-toggle::after {
    content: '♪';
    font-size: 10px;
}

.nav-link {
    color: #00ffcc;
    border-color: #00ffcc;
}

.nav-link:hover {
    background: #00ffcc;
    color: #000;
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
    color: #666;
}

.nav-link.disabled:hover {
    background: rgba(0, 0, 0, 0.7);
    color: #666;
}



/* Responsive design */
@media (min-width: 576px) {
    .story-container {
        padding: 5% 20%;
    }
}

@media screen and (max-width: 800px) {
    .audio-controls {
        width: 60px;
        height: 220px;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        padding: 12px 6px;
        gap: 12px;
    }

    #audio-volume {
        width: 100px;
        height: 25px;
    }
    
    #story-menu {
        font-size: 0.8em;
    }
    
    #vol-title {
        font-size: 0.7em;
    }
    
    .audio-play {
        font-size: 0.8em;
        padding: 4px 8px;
    }
    
    .audio-mute {
        font-size: 0.8em;
        padding: 4px 8px;
    }
}

@media screen and (max-width: 480px) {
    .audio-controls {
        width: 55px;
        height: 200px;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1001;
        padding: 10px 5px;
        gap: 10px;
    }
    
    #audio-volume {
        width: 80px;
        height: 20px;
    }
    
    #story-menu {
        font-size: 1em;
    }
    #audio-volume-spacing {
        padding-bottom: 30px;
    }
    #vol-title {
        font-size: 1em;
        padding-bottom: 25px;
        margin-bottom: 0px;
    }
    
    .audio-play {
        font-size: 1em;
        padding: 3px 6px;
    }
    
    .audio-mute {
        font-size: 1em;
        padding: 3px 6px;
    }
}

/* Loading overlay */
#audio-overlay {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 100000;
    background: #111;
    display: none;
}

.lds-ring {
    display: block;
    position: relative;
    top: 20%;
    margin: auto;
    width: 20em;
    height: 20em;
}

.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 18em;
    height: 18em;
    margin: 6px;
    border: 6px solid #fff;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #fff transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Utility classes */
.hidden {
    display: none;
}

.visible {
    display: block;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* Footer Styling */
.webfooter {
    background: #800080;
    padding: 40px 20px 30px;
    margin-top: 50px;
    border-top: 2px solid #000000;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    color: #fff;
    font-family: 'Arial', sans-serif;
}

.webfooter .title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: #fff;
}

.logo-text-icon1 {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
}

.all-rights-reserved {
    font-size: 0.9rem;
    color: #ccc;
    text-align: center;
}

.webfooter .links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.enter-the-waitlist {
    margin-bottom: 8px;
}

.foot-link {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.foot-link:hover {
    color: #800080;
    text-decoration: underline;
}

.empathetic-ai {
    font-weight: bold;
}

.tm-footer {
    font-size: 0.8rem;
    vertical-align: super;
}

.webfooter .contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.contact1 {
    font-size: 1.1rem;
    font-weight: bold;
    color: #800080;
    margin-bottom: 5px;
}

.email-supporthummaai {
    font-size: 0.95rem;
    color: #ccc;
}

.email-supporthummaai a {
    color: #800080;
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-supporthummaai a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Footer Mobile Responsive */
@media (max-width: 800px) {
    .webfooter {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 15px;
        gap: 25px;
    }
    
    .webfooter .links,
    .webfooter .contact {
        min-width: auto;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .webfooter {
        padding: 25px 10px;
        gap: 20px;
    }
    
    .logo-text-icon1 {
        height: 35px;
    }
    
    .foot-link {
        font-size: 0.9rem;
    }
    
    .contact1 {
        font-size: 1rem;
    }
    
    .email-supporthummaai {
        font-size: 0.9rem;
    }
}
