* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5e6d3 0%, #e8d5c4 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    padding: 30px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-image: 
        repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(0,0,0,0.05) 10px, rgba(0,0,0,0.05) 20px),
        linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
}

.title {
    font-size: 3em;
    color: #FFD700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    font-family: 'Comic Sans MS', cursive, sans-serif;
}

.tagline {
    font-size: 1.2em;
    color: #FFF8DC;
    font-style: italic;
}

/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Video Container */
.video-container {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

#video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

#video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

#canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.start-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.95) 0%, rgba(160, 82, 45, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    z-index: 10;
}

.start-content {
    text-align: center;
    color: white;
    padding: 40px;
}

.start-content h2 {
    font-size: 2em;
    margin-bottom: 30px;
    color: #FFD700;
}

.start-button {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
    border: none;
    padding: 20px 40px;
    font-size: 1.5em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.start-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.privacy-note {
    margin-top: 20px;
    font-size: 0.9em;
    opacity: 0.9;
    line-height: 1.6;
}

/* Lie-o-Meter */
.lie-meter {
    margin-top: 20px;
}

.meter-label {
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.meter-bar {
    width: 100%;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.meter-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #4ade80, #22c55e);
    transition: width 0.3s ease, background 0.5s ease;
    border-radius: 15px;
}

.meter-emoji {
    text-align: center;
    font-size: 3em;
    margin-top: 10px;
}

/* Controls Panel */
.controls-panel {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.control-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
}

.control-section:last-child {
    border-bottom: none;
}

.control-section h3 {
    color: #8B4513;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.radio-group, .button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label, .checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.radio-label:hover, .checkbox-label:hover {
    background: #f0f0f0;
}

.radio-label input, .checkbox-label input {
    cursor: pointer;
}

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

.slider-group label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8B4513;
    cursor: pointer;
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #8B4513;
    cursor: pointer;
    border: none;
}

.color-picker-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    background: white;
}

.action-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #8B4513;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.action-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.speaking-timer {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    color: #8B4513;
    margin-top: 15px;
}

#timer-value {
    font-weight: bold;
    color: #A0522D;
}

/* Collapsible */
.collapsible h3 {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapsible .arrow {
    transition: transform 0.3s;
}

.collapsible.expanded .arrow {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.collapsible.expanded .collapsible-content {
    max-height: 500px;
    padding-top: 15px;
}

.collapsible-content p {
    margin-bottom: 10px;
    line-height: 1.6;
    color: #555;
}

/* Footer */
.footer {
    background: #8B4513;
    color: #FFF8DC;
    text-align: center;
    padding: 20px;
    border-radius: 0 0 20px 20px;
    margin-top: 20px;
}

.footer a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

.share-buttons {
    margin-top: 15px;
}

.share-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1DA1F2;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    transition: background 0.2s;
}

.share-btn:hover {
    background: #0d8bd9;
}

/* Responsive */
@media (max-width: 768px) {
    .title {
        font-size: 2em;
    }
    
    .tagline {
        font-size: 1em;
    }
    
    .start-content h2 {
        font-size: 1.5em;
    }
    
    .start-button {
        font-size: 1.2em;
        padding: 15px 30px;
    }
}