body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f2f5;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    background: #fff;
}

h1 {
    margin: 0 0 20px 0;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
}

h1 span {
    display: inline-block;
    background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: rainbow 3s linear infinite, bubble 2s ease-in-out infinite;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.file-inputs {
    display: flex;
    gap: 20px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

button {
    padding: 10px 20px;
    border: none;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

button.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f0f0f0;
    box-shadow: none;
    transform: none;
}

select {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: auto;
    transition: all 0.3s ease;
}

select:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
}

select.active {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(79, 172, 254, 0.4);
}

select option {
    color: #333;
    background: white;
}

.playback-controls {
    margin-top: 10px;
}

audio {
    width: 100%;
}

main {
    flex: 1;
    overflow: auto;
    padding: 20px;
    position: relative;
    background: #666; /* Contrast for canvas */
    display: block; /* Remove flex to avoid scrolling issues */
}

#canvas-container {
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    width: 720px;
    margin: 0 auto; /* Center horizontally */
}

#scroll-spacer {
    height: 85vh;
    width: 100%;
}

canvas {
    display: block;
    background: white;
    width: 720px;
}

footer {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

#guide-overlay {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 20, 20, 0.95); /* Dark background for contrast */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.3);
    width: 80%;
    max-width: 600px;
    text-align: left;
    z-index: 10;
    pointer-events: none;
    border: 1px solid rgba(255, 165, 0, 0.5);
    backdrop-filter: blur(5px);
}

#guide-overlay h2 {
    color: #ff9800; /* Vivid Orange */
    margin-top: 0;
    text-align: center;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 10px;
    margin-bottom: 20px;
    text-shadow: 0 0 15px rgba(255, 152, 0, 0.8);
    font-weight: 600;
    letter-spacing: 1px;
}

#guide-overlay h3 {
    color: #ffb74d; /* Light Orange */
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(255, 183, 77, 0.6);
}

#guide-overlay ol {
    padding-left: 20px;
}

#guide-overlay li {
    margin-bottom: 12px;
    line-height: 1.6;
    color: #fff3e0; /* Off-white/Orange tint */
    text-shadow: 0 0 5px rgba(255, 165, 0, 0.3);
}

#guide-overlay strong {
    color: #ffab40; /* Accent Orange */
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 171, 64, 0.6);
}

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

@keyframes bubble {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}
#watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    font-size: 60px;
    font-weight: bold;
    color: rgba(200, 200, 200, 0.3);
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
    user-select: none;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    display: none;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 10000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.5); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 80%; /* Could be more or less, depending on screen size */
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-align: center;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}
