/* ===========================
   NO BOOKS BOOK CLUB
   Clean Retro Arcade Style
   =========================== */

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

:root {
    /* Simple, Pleasant Color Palette */
    --bg: #1a1a2e;
    --surface: #25274d;
    --accent: #ff6b6b;
    --accent-bright: #ff8787;
    --text: #eaeaea;
    --text-dim: #a0a0a0;
    
    /* Typography */
    --font-main: 'Press Start 2P', cursive;
    
    /* Spacing */
    --gap: 2rem;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Subtle film grain texture */
.grain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="300" height="300"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.03"/></svg>');
    pointer-events: none;
    z-index: 1000;
}

/* ===========================
   LAYOUT
   =========================== */

.container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

/* ===========================
   HOMEPAGE
   =========================== */

.club-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 3rem;
    line-height: 1.2;
}

.title-primary {
    font-size: clamp(2rem, 7vw, 3.5rem);
    color: var(--accent);
    text-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    letter-spacing: 0.15em;
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { 
        text-shadow: 
            4px 4px 0 rgba(0,0,0,0.3),
            0 0 20px rgba(255, 107, 107, 0.3);
    }
    50% { 
        text-shadow: 
            4px 4px 0 rgba(0,0,0,0.3),
            0 0 30px rgba(255, 107, 107, 0.6);
    }
}

.title-secondary {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--text-dim);
    letter-spacing: 0.2em;
    opacity: 0.7;
}

/* Member Photos Carousel */
.members-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.member-photo {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.member-photo:nth-child(1) { animation-delay: 0s; }
.member-photo:nth-child(2) { animation-delay: 0.2s; }
.member-photo:nth-child(3) { animation-delay: 0.4s; }
.member-photo:nth-child(4) { animation-delay: 0.6s; }
.member-photo:nth-child(5) { animation-delay: 0.8s; }

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

.member-photo:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255,107,107,0.4);
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Main Action Button - Kinetic & Fun */
.action-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.btn-main {
    display: inline-block;
    padding: 1.5rem 3rem;
    background: var(--accent);
    color: var(--bg);
    text-decoration: none;
    border: 4px solid var(--accent);
    font-size: 1.2rem;
    letter-spacing: 0.1em;
    transition: all 0.2s ease;
    box-shadow: 
        0 6px 0 #cc5555,
        0 10px 20px rgba(0,0,0,0.4);
    position: relative;
    top: 0;
    animation: pulse-button 2s ease-in-out infinite;
}

@keyframes pulse-button {
    0%, 100% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.02);
    }
}

.btn-main:hover {
    background: var(--accent-bright);
    border-color: var(--accent-bright);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 
        0 8px 0 #cc5555,
        0 14px 28px rgba(0,0,0,0.5),
        0 0 30px rgba(255,107,107,0.4);
    animation: none;
}

.btn-main:active {
    transform: translateY(4px) scale(0.98);
    box-shadow: 
        0 2px 0 #cc5555,
        0 4px 10px rgba(0,0,0,0.3);
}

/* Secondary Action - Less Prominent */
.secondary-action {
    margin-top: 2rem;
}

.btn-secondary {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--text-dim);
    transition: all 0.3s ease;
    opacity: 0.6;
}

.btn-secondary:hover {
    color: var(--accent);
    border-color: var(--accent);
    opacity: 1;
}

/* Standard Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--surface);
    color: var(--text);
    text-decoration: none;
    border: 3px solid var(--accent);
    font-size: 1rem;
    letter-spacing: 0.1em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 rgba(0,0,0,0.3);
    position: relative;
    top: 0;
}

.btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 rgba(0,0,0,0.3);
}

.btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

/* ===========================
   SECONDARY PAGES
   =========================== */

.back-btn {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-dim);
    text-decoration: none;
    margin-bottom: 2rem;
    padding: 0.5rem 1rem;
    border: 2px solid var(--text-dim);
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.page-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: var(--accent);
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
}

.section-subtitle {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin: 2rem 0 1.5rem;
    letter-spacing: 0.1em;
}

/* ===========================
   GAME PLACEHOLDER (Records Page)
   =========================== */

.game-placeholder {
    width: 100%;
    max-width: 600px;
    height: 400px;
    margin: 0 auto 3rem;
    background: var(--surface);
    border: 3px dashed var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.game-placeholder-content {
    text-align: center;
}

.placeholder-text {
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.placeholder-subtext {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.15em;
}

/* ===========================
   ARCHIVE PAGE
   =========================== */

.games-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    text-align: left;
}

.game-card {
    background: var(--surface);
    padding: 1.5rem;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.game-card:hover {
    transform: translateX(5px);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.game-name {
    font-size: 1.2rem;
    color: var(--accent);
}

.game-date {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.game-platforms {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.platform {
    font-size: 0.6rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--text-dim);
}

.game-ratings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
    font-size: 0.8rem;
}

.rating-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--bg);
}

.player {
    color: var(--text-dim);
}

.score {
    color: var(--accent);
    font-weight: bold;
}

.avg-rating {
    grid-column: 1 / -1;
    text-align: center;
    padding: 0.8rem;
    background: var(--bg);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* ===========================
   VOTE PAGE
   =========================== */

.voting-page {
    max-width: 900px;
}

/* Add Game Section */
.add-game-section {
    background: var(--surface);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.section-label {
    font-size: 1rem;
    color: var(--accent);
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.add-game-form {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.game-input {
    flex: 1;
    padding: 1rem;
    background: var(--bg);
    border: 2px solid var(--accent);
    color: var(--text);
    font-family: var(--font-main);
    font-size: 0.8rem;
    outline: none;
    transition: all 0.3s ease;
}

.game-input:focus {
    border-color: var(--accent-bright);
    box-shadow: 0 0 10px rgba(255,107,107,0.3);
}

.game-input::placeholder {
    color: var(--text-dim);
    opacity: 0.6;
}

.btn-add {
    padding: 1rem 2rem;
    background: var(--accent);
    color: var(--bg);
    border: 3px solid var(--accent);
    font-family: var(--font-main);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 0 #cc5555;
}

.btn-add:hover {
    background: var(--accent-bright);
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #cc5555;
}

.btn-add:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #cc5555;
}

.helper-text {
    font-size: 0.65rem;
    color: var(--text-dim);
    text-align: center;
    margin-top: 0.5rem;
}

/* Games List Section */
.games-section {
    background: var(--surface);
    padding: 2rem;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-reset {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--text-dim);
    border: 2px solid var(--text-dim);
    font-family: var(--font-main);
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.games-list-widget {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Game Card in Widget */
.game-card-widget {
    background: var(--bg);
    padding: 1.5rem;
    border: 2px solid var(--accent);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.game-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.game-card-title {
    font-size: 1rem;
    color: var(--accent);
    word-break: break-word;
}

.delete-btn {
    padding: 0.4rem 0.8rem;
    background: transparent;
    color: var(--text-dim);
    border: 1px solid var(--text-dim);
    font-family: var(--font-main);
    font-size: 0.6rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.game-votes {
    margin-bottom: 1rem;
}

.vote-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
}

.vote-label {
    color: var(--text-dim);
    min-width: 80px;
}

.vote-names {
    color: var(--text);
    flex: 1;
}

.vote-names.empty {
    color: var(--text-dim);
    font-style: italic;
}

.vote-count {
    color: var(--accent);
    font-weight: bold;
}

.vote-actions {
    display: flex;
    gap: 0.5rem;
}

.vote-btn {
    flex: 1;
    padding: 0.8rem;
    font-family: var(--font-main);
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    cursor: pointer;
    border: 2px solid;
    transition: all 0.3s ease;
    box-shadow: 0 2px 0 rgba(0,0,0,0.3);
}

.vote-btn:active {
    transform: translateY(2px);
    box-shadow: none;
}

.vote-btn.can-play {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--text-dim);
}

.vote-btn.can-play:hover {
    background: rgba(0,255,0,0.1);
    color: #4ade80;
    border-color: #4ade80;
}

.vote-btn.can-play.active {
    background: #4ade80;
    color: var(--bg);
    border-color: #4ade80;
}

.vote-btn.cant-play {
    background: transparent;
    color: var(--text-dim);
    border-color: var(--text-dim);
}

.vote-btn.cant-play:hover {
    background: rgba(255,0,0,0.1);
    color: #ff6b6b;
    border-color: #ff6b6b;
}

.vote-btn.cant-play.active {
    background: #ff6b6b;
    color: var(--bg);
    border-color: #ff6b6b;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-dim);
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.empty-subtext {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* Member Name Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    border: 4px solid var(--accent);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    font-size: 1.2rem;
    color: var(--accent);
    text-align: center;
    margin-bottom: 1rem;
    letter-spacing: 0.1em;
}

.modal-text {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.name-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
}

.name-btn {
    padding: 1rem;
    background: var(--bg);
    color: var(--text);
    border: 2px solid var(--accent);
    font-family: var(--font-main);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.name-btn:hover {
    background: var(--accent);
    color: var(--bg);
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 600px) {
    .add-game-form {
        flex-direction: column;
    }
    
    .btn-add {
        width: 100%;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn-reset {
        width: 100%;
    }
    
    .vote-actions {
        flex-direction: column;
    }
    
    .game-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.vote-section {
    background: var(--surface);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 3px solid var(--accent);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-align: left;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.step-header h2 {
    font-size: 1rem;
    color: var(--accent);
}

.status {
    font-size: 0.6rem;
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--accent);
    letter-spacing: 0.1em;
}

.status.open {
    background: var(--accent);
    color: var(--bg);
    animation: pulse 2s infinite;
}

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

.status.waiting {
    color: var(--text-dim);
    border-color: var(--text-dim);
}

.step-text {
    font-size: 0.8rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-dim);
}

.nominees-box {
    background: var(--bg);
    padding: 1rem;
    margin: 1rem 0;
    border-left: 3px solid var(--accent);
}

.nominees-box h3 {
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.placeholder {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-style: italic;
}

.btn-primary {
    display: inline-block;
    margin-top: 1rem;
}

.btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 600px) {
    body {
        padding: 1rem;
    }
    
    .title-primary {
        font-size: 2rem;
    }
    
    .title-secondary {
        font-size: 1rem;
    }
    
    .member-photo {
        width: 60px;
        height: 60px;
    }
    
    .members-carousel {
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn-main {
        font-size: 1rem;
        padding: 1.2rem 2rem;
    }
    
    .game-placeholder {
        height: 300px;
    }
    
    .game-ratings {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .member-photo {
        width: 50px;
        height: 50px;
    }
    
    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-main {
        width: 100%;
        padding: 1rem 1.5rem;
    }
}
