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

:root {
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --gray: #6c757d;
    --dark-gray: #343a40;
    --black: #000000;
    
    --tech-blue: #007bff;
    --tech-green: #28a745;
    --tech-red: #dc3545;
    --tech-yellow: #ffc107;
    
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--off-white);
    color: var(--dark-gray);
    line-height: 1.6;
}

.app-container {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    min-height: 100vh;
    box-shadow: 0 0 50px var(--shadow-light);
}

/* Header */
.app-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--tech-blue);
}

.logo {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--white);
    letter-spacing: 1px;
}

.logo .irl {
    color: var(--tech-blue);
}

.episode-badge {
    background: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 2px;
    color: var(--dark-gray);
}

/* Screen Management */
.screen {
    display: none;
    min-height: calc(100vh - 120px);
    padding: 2rem;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* Welcome Screen */
.welcome-container {
    max-width: 900px;
    margin: 0 auto;
}

.product-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--light-gray), var(--white));
    border-radius: 12px;
    margin-bottom: 3rem;
}

.product-hero h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1.3rem;
    color: var(--gray);
    margin-bottom: 2rem;
}

.cookie-visual {
    font-size: 5rem;
    margin: 2rem 0;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.product-info h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--dark-gray);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.info-card:hover {
    border-color: var(--tech-blue);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.info-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.info-card p {
    color: var(--gray);
    font-size: 0.95rem;
}

.disclaimer {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid var(--tech-red);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.disclaimer p {
    color: var(--tech-red);
    font-size: 0.9rem;
    line-height: 1.8;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-danger, .btn-warning {
    padding: 1rem 2rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
}

.btn-primary {
    background: var(--tech-blue);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--dark-gray);
    border: 2px solid var(--gray);
}

.btn-secondary:hover {
    background: var(--light-gray);
}

.btn-danger {
    background: var(--tech-red);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-warning {
    background: var(--tech-yellow);
    color: var(--dark-gray);
}

.btn-warning:hover {
    background: #e0a800;
}

/* Extraction Form */
.extraction-form {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

h2 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.subtitle {
    color: var(--gray);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.question-block {
    margin-bottom: 2rem;
}

.question-block label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.question-block input,
.question-block select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--light-gray);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.question-block input:focus,
.question-block select:focus {
    outline: none;
    border-color: var(--tech-blue);
}

/* Processing Screen */
.cookie-animation {
    margin: 3rem 0;
}

.cookie-spinner {
    font-size: 6rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.processing-text {
    font-size: 1.2rem;
    color: var(--gray);
    margin: 2rem 0;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
    margin: 2rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tech-blue), var(--tech-green));
    width: 0%;
    transition: width 0.5s;
}

.tech-readout {
    text-align: left;
    background: var(--off-white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.tech-readout p {
    margin: 0.8rem 0;
    font-family: 'Courier New', monospace;
    color: var(--gray);
}

/* Cookie Display */
.cookie-container {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.cookie-display {
    text-align: center;
    margin-bottom: 2rem;
}

.cookie-avatar {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.cookie-avatar.suffering {
    animation: shake 0.5s infinite;
    filter: grayscale(50%);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) rotate(-5deg); }
    75% { transform: translateX(5px) rotate(5deg); }
}

.cookie-status {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--tech-green);
    color: var(--white);
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.cookie-dialogue {
    margin: 2rem 0;
}

.dialogue-box {
    background: var(--off-white);
    border-left: 4px solid var(--tech-blue);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.dialogue-box.cookie-speaking {
    border-left-color: var(--tech-red);
}

.dialogue-box p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-gray);
}

.response-options,
.training-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.choice-btn {
    padding: 1.2rem;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    font-size: 1rem;
    color: var(--dark-gray);
}

.choice-btn:hover {
    border-color: var(--tech-blue);
    background: var(--off-white);
    transform: translateX(5px);
}

/* Training Screen */
.training-header {
    background: var(--off-white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.cookie-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-weight: 600;
}

.cookie-name {
    color: var(--dark-gray);
}

.obedience-level {
    color: var(--tech-red);
}

.obedience-bar {
    width: 100%;
    height: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
}

.obedience-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tech-red), var(--tech-yellow), var(--tech-green));
    width: 0%;
    transition: width 1s;
}

.training-scenario {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.scenario-description {
    margin-bottom: 2rem;
}

.scenario-description h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.scenario-description p {
    color: var(--gray);
    line-height: 1.8;
}

.time-dilation-warning {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid var(--tech-red);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.time-dilation-warning p {
    color: var(--tech-red);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Time Dilation Screen */
.time-counter {
    margin: 3rem 0;
}

.time-counter p {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.time-counter h1 {
    font-size: 4rem;
    color: var(--tech-red);
    font-weight: 300;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.cookie-suffering {
    margin: 3rem 0;
}

.suffering-message {
    font-size: 1.3rem;
    color: var(--tech-red);
    font-style: italic;
    margin-top: 2rem;
}

/* Assistant Interface */
.assistant-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-top: 2rem;
}

.cookie-panel {
    background: var(--off-white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.cookie-avatar-large {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.cookie-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
}

.cookie-stats p {
    margin: 0.8rem 0;
    color: var(--gray);
}

.cookie-stats span {
    font-weight: bold;
    color: var(--dark-gray);
}

.control-panel {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    padding: 2rem;
}

.control-panel h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark-gray);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.control-btn:hover {
    border-color: var(--tech-blue);
    background: var(--off-white);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--shadow-light);
}

.control-icon {
    font-size: 2rem;
}

.command-log {
    background: var(--off-white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 1rem;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.log-entry {
    margin: 0.5rem 0;
    color: var(--gray);
}

.log-entry.command {
    color: var(--tech-blue);
    font-weight: bold;
}

.log-entry.response {
    color: var(--dark-gray);
}

.ethical-reflection {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--light-gray);
}

/* Ending Screen */
.ending-content {
    max-width: 600px;
    margin: 2rem auto;
}

.ending-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--dark-gray);
    margin-bottom: 2rem;
}

.ending-stats {
    background: var(--off-white);
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: left;
}

.ending-stats p {
    margin: 0.8rem 0;
    color: var(--gray);
}

.ending-stats strong {
    color: var(--dark-gray);
}

.episode-quote {
    background: rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--dark-gray);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.episode-quote p {
    margin: 0.5rem 0;
    color: var(--dark-gray);
}

.quote-source {
    text-align: right;
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 1rem;
}

/* Bottom Nav */
.bottom-nav {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: var(--off-white);
    border-top: 2px solid var(--light-gray);
}

.nav-link {
    color: var(--tech-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--dark-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .assistant-layout {
        grid-template-columns: 1fr;
    }
    
    .control-grid {
        grid-template-columns: 1fr;
    }
}
