body {
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
}
button[title] {
    --tooltip-delay: 0ms !important;
}
button[title]:hover {
    --tooltip-delay: 0ms !important;
}
canvas {
    display: block;
    width: 60vw !important;
    height: 100vh !important;
}
#back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    padding: 12px 24px;
    font-size: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    user-select: none;
    touch-action: manipulation;
}
#back-btn.active {
    opacity: 1;
    pointer-events: all;
}
#back-btn:hover {
    background: white;
    transform: scale(1.1);
}
#back-btn:active {
    transform: scale(0.95);
}
#text-panel {
    position: fixed;
    right: 0;
    top: 0;
    width: 40vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    z-index: 50;
    display: flex;
    flex-direction: column;
}
#text-content {
    color: #000000;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.3px;
    opacity: 1;
    transition: opacity 0.5s ease;
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}
#upload-section {
    margin-top: 24px;
}
.text-line {
    opacity: 0;
    transition: opacity 0.8s ease;
}
.text-line.visible {
    opacity: 1;
}
#panel-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 40px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#disclaimer {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    margin: 0;
}
#claude-attribution {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #666;
    pointer-events: none;
    margin: 0;
}
#download-btn {
    padding: 12px 24px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    background: rgba(102, 126, 234, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, background 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
    display: none;
}
#download-btn.visible {
    display: block;
    opacity: 1;
    pointer-events: all;
}
#download-btn:hover {
    background: rgba(102, 126, 234, 1);
    transform: translateY(-2px);
}
#download-btn:active {
    transform: translateY(0);
}
#text-content.fade-in {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    to { opacity: 1; }
}
#upload-area {
    border: 2px dashed #999;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.15) 0%, rgba(142, 68, 173, 0.15) 25%, rgba(52, 152, 219, 0.15) 50%, rgba(26, 188, 156, 0.15) 75%, rgba(243, 156, 18, 0.15) 100%);
}
#upload-area:hover {
    border-color: #666;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.25) 0%, rgba(142, 68, 173, 0.25) 25%, rgba(52, 152, 219, 0.25) 50%, rgba(26, 188, 156, 0.25) 75%, rgba(243, 156, 18, 0.25) 100%);
}
#upload-area.dragover {
    border-color: #333;
    background: linear-gradient(135deg, rgba(255, 107, 157, 0.35) 0%, rgba(142, 68, 173, 0.35) 25%, rgba(52, 152, 219, 0.35) 50%, rgba(26, 188, 156, 0.35) 75%, rgba(243, 156, 18, 0.35) 100%);
    transform: scale(1.02);
}
#demo-btn {
    display: block;
    margin: 16px auto 0 auto;
    padding: 12px 24px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: bold;
    background: rgba(142, 68, 173, 0.9);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}
#demo-btn:hover {
    background: rgba(142, 68, 173, 1);
    transform: translateY(-2px);
}
.iridescent-title {
    background: linear-gradient(135deg, #ff6b9d, #8e44ad, #3498db, #1abc9c, #f39c12);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 18px;
    animation: iridescent-shift 3s ease infinite;
}
.iridescent-category {
    background: linear-gradient(135deg, #ff6b9d, #8e44ad, #3498db, #1abc9c, #f39c12);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    font-size: 17px;
    animation: iridescent-shift 3s ease infinite;
}
@keyframes iridescent-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
#upload-text {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #333;
}
#example-link {
    text-align: center;
    margin-top: 12px;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #666;
}
#example-trigger {
    color: #8e44ad;
    text-decoration: underline;
    cursor: pointer;
    font-weight: bold;
}
#example-trigger:hover {
    color: #3498db;
}
#example-preview {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 32vw;
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 3000;
}
#example-preview img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}
#file-input {
    display: none;
}
#audio-toggle {
    position: fixed;
    top: 20px;
    right: calc(40vw + 20px);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
#audio-toggle:hover {
    background: white;
    transform: scale(1.1);
}
#camera-btn {
    position: fixed;
    bottom: 20px;
    left: calc(60vw - 60px);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}
#camera-btn:hover {
    background: white;
    transform: scale(1.1);
}
#loading-container {
    display: none;
    position: absolute;
    top: 40px;
    left: 40px;
    right: 40px;
    opacity: 1;
    transition: opacity 0.5s ease;
}
#loading-container.fade-out {
    opacity: 0;
}
#loading-text {
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}
#loading-bar-bg {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    overflow: hidden;
}
#loading-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}
