/**
 * CS 470 - Game Development
 * Common Reveal.js Styles
 *
 * Include this file in all lecture HTML files:
 * <link rel="stylesheet" href="../common.css">
 */

/* ============================================ */
/* CSS Variables / Theme Colors                 */
/* ============================================ */
:root {
    --accent-color: #2a76dd;
    --accent-dark: #1a5bb8;
    --accent-secondary: #e74c3c;
    --accent-tertiary: #3498db;
}

/* ============================================ */
/* Base Reveal.js Overrides                     */
/* ============================================ */
.reveal h1, .reveal h2, .reveal h3 {
    text-transform: none;
}

.reveal .slides section {
    height: 100%;
}

/* ============================================ */
/* Media Placeholder                            */
/* ============================================ */
.media-placeholder {
    border: 3px dashed #888;
    padding: 80px 40px;
    margin: 20px auto;
    background: #f0f0f0;
    color: #666;
    font-style: italic;
    text-align: center;
    border-radius: 8px;
    max-width: 80%;
}

.media-placeholder .filename {
    font-family: monospace;
    font-size: 1.1em;
    color: #495057;
    margin-bottom: 8px;
    font-style: italic;
}

.media-placeholder .description,
.media-placeholder small {
    display: block;
    margin-top: 10px;
    font-size: 0.8em;
    color: #999;
}

/* ============================================ */
/* Section Title Cards                          */
/* ============================================ */
.section-title {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 60px 80px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(42, 118, 221, 0.3);
}

.section-title h2 {
    color: white;
    margin: 0;
    font-size: 2.5em;
}

/* ============================================ */
/* Big Numbers & Text                           */
/* ============================================ */
.big-number {
    font-size: 5em;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.big-text {
    font-size: 3em;
    font-weight: bold;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

/* Animated counter */
.counter {
    font-size: 4em;
    font-weight: bold;
    color: var(--accent-color);
}

/* ============================================ */
/* Comparison Grids                             */
/* ============================================ */
.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
}

.compare-item {
    background: #f8f9fa;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
}

.compare-item h3 {
    margin: 0 0 10px 0;
    color: var(--accent-color);
}

.compare-item .percent {
    font-size: 2.5em;
    font-weight: bold;
    color: #333;
}

/* ============================================ */
/* Spectrum Bar                                 */
/* ============================================ */
.spectrum {
    display: flex;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    margin: 40px 0;
}

.spectrum-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.3em;
}

.spectrum-aaa { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.spectrum-aa { background: linear-gradient(135deg, #f39c12, #d68910); }
.spectrum-indie { background: linear-gradient(135deg, #27ae60, #1e8449); }

/* ============================================ */
/* Role Cards                                   */
/* ============================================ */
.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.role-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
}

.role-card h4 {
    margin: 0 0 5px 0;
    color: var(--accent-color);
}

.role-card p {
    margin: 0;
    font-size: 0.8em;
    color: #666;
}

/* ============================================ */
/* Timeline                                     */
/* ============================================ */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    align-items: center;
    margin: 20px 0;
}

.timeline-item .year {
    flex: 1;
    text-align: right;
    padding-right: 30px;
    font-weight: bold;
    font-size: 1.2em;
    color: var(--accent-color);
}

.timeline-item .event {
    flex: 1;
    text-align: left;
    padding-left: 30px;
}

/* ============================================ */
/* Stat Boxes                                   */
/* ============================================ */
.stat-box {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-dark));
    color: white;
    padding: 20px 40px;
    border-radius: 12px;
    margin: 10px;
}

.stat-box .number {
    font-size: 2.5em;
    font-weight: bold;
}

.stat-box .label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* ============================================ */
/* Styled Lists                                 */
/* ============================================ */
.reveal ul.styled-list {
    list-style: none;
    padding: 0;
}

.reveal ul.styled-list li {
    background: #f8f9fa;
    margin: 15px 0;
    padding: 20px 30px;
    border-radius: 10px;
    border-left: 5px solid var(--accent-color);
    text-align: left;
}

/* ============================================ */
/* VS Comparison                                */
/* ============================================ */
.vs-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

.vs-item {
    flex: 1;
    max-width: 300px;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.vs-divider {
    font-size: 3em;
    font-weight: bold;
    color: #ccc;
}

/* ============================================ */
/* Logo Grid                                    */
/* ============================================ */
.logo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.logo-box {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    font-weight: bold;
    color: #666;
}

/* ============================================ */
/* MDA Framework Boxes                          */
/* ============================================ */
.mda-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.mda-box {
    padding: 30px 20px;
    border-radius: 12px;
    color: white;
    text-align: center;
}

.mda-box h3 { margin: 0 0 10px 0; color: white; }
.mda-box p { margin: 0; font-size: 0.9em; opacity: 0.9; }
.mda-mechanics { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.mda-dynamics { background: linear-gradient(135deg, #f39c12, #d68910); }
.mda-aesthetics { background: linear-gradient(135deg, #27ae60, #1e8449); }

/* ============================================ */
/* Activity Card                                */
/* ============================================ */
.activity-card {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.activity-card h3 {
    color: white;
    margin: 0 0 20px 0;
}

.activity-card ol {
    text-align: left;
    font-size: 1.1em;
}

/* ============================================ */
/* Evolution Arrow                              */
/* ============================================ */
.evolution-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.evolution-item {
    background: #f8f9fa;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
}

.evolution-arrow .arrow {
    font-size: 1.5em;
    color: var(--accent-color);
}

/* ============================================ */
/* Flow Zone Diagram                            */
/* ============================================ */
.flow-zone {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 0;
    margin: 30px auto;
    max-width: 700px;
}

.flow-zone .zone {
    flex: 1;
    padding: 40px 20px;
    text-align: center;
    color: white;
    font-weight: bold;
}

.zone-anxiety { background: linear-gradient(180deg, #e74c3c, #c0392b); border-radius: 12px 0 0 12px; }
.zone-flow { background: linear-gradient(180deg, #27ae60, #1e8449); }
.zone-boredom { background: linear-gradient(180deg, #3498db, #2980b9); border-radius: 0 12px 12px 0; }

/* ============================================ */
/* Feedback Loop                                */
/* ============================================ */
.loop-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.loop-item {
    background: var(--accent-color);
    color: white;
    padding: 20px 30px;
    border-radius: 50px;
    font-weight: bold;
}

.loop-arrow {
    font-size: 2em;
    color: var(--accent-color);
}

/* ============================================ */
/* Blend Diagram                                */
/* ============================================ */
.blend-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.blend-circle {
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.85em;
    text-align: center;
    white-space: nowrap;
}

.blend-plus {
    font-size: 2em;
    color: #666;
}

.blend-equals {
    font-size: 2em;
    color: var(--accent-color);
}

/* ============================================ */
/* Risk-Reward Bar                              */
/* ============================================ */
.risk-reward-bar {
    display: flex;
    height: 60px;
    border-radius: 30px;
    overflow: hidden;
    margin: 20px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.risk-side {
    flex: 1;
    background: linear-gradient(90deg, #27ae60, #f39c12);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 20px;
    color: white;
    font-weight: bold;
}

.reward-side {
    flex: 1;
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 20px;
    color: white;
    font-weight: bold;
}

/* ============================================ */
/* Custom Fragment Animations                   */
/* ============================================ */
.reveal .slides section .fragment.grow-in {
    opacity: 0;
    transform: scale(0.5);
}
.reveal .slides section .fragment.grow-in.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
}

.reveal .slides section .fragment.slide-left {
    opacity: 0;
    transform: translateX(100px);
}
.reveal .slides section .fragment.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.4s ease;
}

.reveal .slides section .fragment.slide-right {
    opacity: 0;
    transform: translateX(-100px);
}
.reveal .slides section .fragment.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.4s ease;
}

.reveal .slides section .fragment.pop {
    opacity: 0;
    transform: scale(0.8);
}
.reveal .slides section .fragment.pop.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ============================================ */
/* Zoom & Pulse Animations                      */
/* ============================================ */
.zoom-in {
    animation: zoomIn 0.5s ease-out;
}
@keyframes zoomIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Glow effect */
.glow {
    text-shadow: 0 0 20px rgba(42, 118, 221, 0.5);
}

/* ============================================ */
/* Callout Boxes                                */
/* ============================================ */
.callout {
    padding: 20px 25px;
    border-radius: 8px;
    border-left: 5px solid;
    text-align: left;
    margin: 20px auto;
    max-width: 80%;
}

.callout-tip {
    background: #e8f5e9;
    border-color: #27ae60;
}

.callout-warning {
    background: #fff3e0;
    border-color: #f39c12;
}

.callout-note {
    background: #e3f2fd;
    border-color: #3498db;
}

/* ============================================ */
/* Split Slide Layout (media left, details right) */
/* ============================================ */
.split-slide {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 25px;
    align-items: center;
    margin-top: 20px;
}

.split-slide .media-placeholder {
    margin: 0;
    padding: 100px 50px;
}

.split-slide .split-details {
    text-align: left;
    font-size: 0.5em;
}

.split-slide .compare-grid {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 0;
}

.split-slide .compare-item {
    padding: 12px 16px;
    text-align: left;
    display: flex;
    gap: 12px;
    align-items: center;
}

.split-slide .compare-item h3 {
    margin: 0;
    min-width: 70px;
    font-size: 1em;
}

.split-slide .compare-item p {
    margin: 0;
}
