/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2a1a2e 0%, #3e1e2e 50%, #4a1f3a 100%);
    min-height: 100vh;
    color: #ffffff;
}

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



/* Main Content Layout */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    gap: 20px;
    padding: 10px 0;
}

/* Visualization Container */
.visualization-container {
    width: 90vw;
    max-width: 900px;
    height: 45vh;
    background: #1e1e2e;
    border-radius: 15px;
    padding: 20px;
    position: relative;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 2px solid #8b4f6b;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Station Content Styles */
.station-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Barcode Scanner Station */
.scanner-display {
    text-align: center;
    width: 100%;
}

.scanner-text {
    font-size: 1.8rem;
    color: #d67c9c;
    margin-bottom: 20px;
    font-weight: 600;
}

.scanner-status {
    font-size: 1.3rem;
    color: #d67c9c;
    margin-bottom: 15px;
    font-weight: 600;
}

.scanned-code {
    font-size: 1.8rem;
    color: #c77a8a;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    margin-bottom: 15px;
    min-height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scanner-hint {
    font-size: 1rem;
    color: #e0c5d0;
    background: rgba(45, 55, 72, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #8b4f6b;
}

/* Keyboard Station */
.keyboard-display {
    width: 100%;
    text-align: center;
}

#keyboardInput {
    width: 80%;
    max-width: 500px;
    padding: 15px 20px;
    font-size: 1.5rem;
    border: 2px solid #4a90e2;
    border-radius: 10px;
    background: #2d3748;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

#keyboardInput:focus {
    outline: none;
    border-color: #5ba0f2;
    box-shadow: 0 0 20px rgba(74, 144, 226, 0.3);
}

.typed-text {
    font-size: 2rem;
    color: #48c774;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Microphone Station */
#micVisualizer {
    width: 100%;
    max-width: 800px;
    height: 300px;
    background: #2d3748;
    border-radius: 15px;
    border: 2px solid #4a90e2;
}

.mic-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

/* Camera Station */
#cameraFeed {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: #2d3748;
    border-radius: 15px;
    border: 2px solid #4a90e2;
    object-fit: cover;
}

.camera-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.photo-display {
    margin-top: 20px;
    max-width: 300px;
}

.photo-display img {
    width: 100%;
    border-radius: 10px;
    border: 2px solid #4a90e2;
}

/* Touch Station */
.touch-area {
    width: 100%;
    max-width: 600px;
    height: 400px;
    background: #2d3748;
    border-radius: 15px;
    border: 2px solid #4a90e2;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.touch-instruction {
    font-size: 1.5rem;
    color: #4a90e2;
    font-weight: 600;
}

.touch-visualization {
    position: absolute;
    pointer-events: none;
}

.touch-point {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #48c774;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: touch-ripple 0.6s ease-out forwards;
}

@keyframes touch-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Controls */
.control-btn {
    padding: 12px 25px;
    border: 2px solid #d67c9c;
    border-radius: 20px;
    background: linear-gradient(45deg, #d67c9c, #b8627a);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(214, 124, 156, 0.4);
    border-color: #e092b0;
}

.control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.control-btn.active {
    background: linear-gradient(45deg, #c77a8a, #b8627a);
    border-color: #c77a8a;
}

.mic-status {
    font-size: 0.9rem;
    color: #e0c5d0;
    font-weight: 500;
}

/* Mission Box */
.mission-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    padding: 20px 30px;
    border-radius: 18px;
    border: 2px solid #d67c9c;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    max-width: 1000px;
    margin: 0 auto;
}

/* Byte Companion */
.byte-companion {
    position: relative;
}

.byte-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d67c9c, #b8627a);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #e092b0;
    box-shadow: 0 6px 18px rgba(214, 124, 156, 0.3);
    transition: all 0.5s ease;
}

.byte-character {
    width: 4rem;
    height: 4rem;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3));
}

/* Byte Happy State */
.byte-companion.happy .byte-circle {
    background: linear-gradient(135deg, #c77a8a, #a85c6f);
    border-color: #d996ac;
    box-shadow: 0 4px 15px rgba(199, 122, 138, 0.5);
    animation: byte-bounce 0.6s ease-in-out;
}

.byte-companion.happy .byte-character {
    transform: scale(1.2);
}

@keyframes byte-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.mission-text h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: 600;
}

.mission-text p {
    margin: 2px 0 0 0;
    color: #e0c5d0;
    font-size: 1.2rem;
    line-height: 1.3;
}

/* Success Animation */
.success-feedback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #c77a8a, #a85c6f);
    color: white;
    padding: 25px 50px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 1.8rem;
    z-index: 20;
    box-shadow: 0 12px 40px rgba(199, 122, 138, 0.5);
    border: 3px solid #d996ac;
    animation: celebration 0.8s ease-in-out;
    pointer-events: none;
}

@keyframes celebration {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(1.2); }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}



/* Responsive Design */
@media (max-width: 1200px) {
    .visualization-container {
        width: 95vw;
        height: 50vh;
    }
    

}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    

    
    .visualization-container {
        width: 98vw;
        height: 45vh;
        padding: 20px;
    }
    

    
    .mission-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px 40px;
        max-width: 90vw;
    }
    
    .mission-text h3 {
        font-size: 2rem;
    }
    
    .mission-text p {
        font-size: 1.6rem;
    }
    
    .scanner-text {
        font-size: 1.5rem;
    }
    
    .scanner-status {
        font-size: 1.2rem;
    }
    
    .scanned-code {
        font-size: 1.5rem;
    }
    
    #keyboardInput {
        font-size: 1.2rem;
    }
    
    .typed-text {
        font-size: 1.5rem;
    }
}

/* Timer Display */
.timer-display {
    text-align: center;
    padding: 8px 12px;
    background: rgba(45, 55, 72, 0.6);
    border-radius: 10px;
    border: 1px solid #8b4f6b;
    min-width: 80px;
}

.timer-text {
    font-size: 0.8rem;
    color: #e0c5d0;
    margin-bottom: 2px;
    font-weight: 500;
}

.timer-value {
    font-size: 1.1rem;
    color: #d67c9c;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal-content {
    display: flex;
    align-items: center;
    gap: 40px;
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    padding: 40px 60px;
    border-radius: 24px;
    border: 3px solid #d67c9c;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    text-align: center;
}

.modal-byte .byte-circle {
    width: 120px;
    height: 120px;
    border: 8px solid #e092b0;
}

.modal-byte .byte-character {
    width: 7rem;
    height: 7rem;
}

.modal-text h3 {
    font-size: 2.5rem;
    color: #ffffff;
    margin-bottom: 20px;
    font-weight: 600;
}

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

.modal-timer-value {
    font-size: 3rem;
    color: #d67c9c;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    margin-bottom: 10px;
}

.modal-timer-text {
    font-size: 1.2rem;
    color: #e0c5d0;
    font-weight: 500;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        gap: 20px;
        padding: 30px 40px;
        max-width: 90vw;
    }
    
    .modal-text h3 {
        font-size: 2rem;
    }
    
    .modal-timer-value {
        font-size: 2.5rem;
    }
    
    .modal-timer-text {
        font-size: 1rem;
    }
    
    .timer-display {
        padding: 8px 12px;
        min-width: 80px;
    }
    
    .timer-text {
        font-size: 0.8rem;
    }
    
    .timer-value {
        font-size: 1.2rem;
    }
}

/* Footer */
footer {
    margin-top: 10px;
    padding: 10px 0;
    border-top: 1px solid #8b4f6b;
}

.impressum {
    text-align: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 10px;
}

.impressum p {
    color: #e0c5d0;
    font-size: 0.75rem;
    line-height: 1.3;
}

.impressum a {
    color: #d67c9c;
    text-decoration: none;
    margin: 0 8px;
    transition: color 0.3s ease;
}

.impressum a:hover {
    color: #e092b0;
    text-decoration: underline;
}

@media (max-width: 768px) {
    footer {
        margin-top: 5px;
        padding: 8px 0;
    }
    
    .impressum p {
        font-size: 0.65rem;
        line-height: 1.2;
    }
    
    .impressum a {
        margin: 0 3px;
    }
}