/* Kawaii Bingo Game Styles */

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

body {
    font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: linear-gradient(180deg, #E8F4F8 0%, #B8E0F6 100%);
    border-radius: 30px;
    padding: 20px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 5px solid #fff;
}

/* Header Section */
.game-header {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.latest-number-display {
    flex: 1;
    background: linear-gradient(135deg, #FFE4E9 0%, #FFD1DC 100%);
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.latest-number-display .label {
    font-size: 12px;
    color: #FF8FA3;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.latest-number-display .number {
    font-size: 48px;
    font-weight: bold;
    color: #FF6B9D;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.5);
    animation: pulse 1s ease-in-out infinite;
}

.timer-display {
    background: linear-gradient(135deg, #FFE4E9 0%, #FFD1DC 100%);
    border: 3px solid #fff;
    border-radius: 20px;
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.timer-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.timer {
    font-size: 20px;
    font-weight: bold;
    color: #FF6B9D;
}

/* Game Status */
.game-status {
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 12px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

#statusText {
    font-size: 16px;
    font-weight: bold;
    color: #667eea;
}

/* Round Info */
.round-info {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 8px 15px;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: bold;
}

.round-id {
    color: #667eea;
}

.game-phase {
    color: #FF6B9D;
}

/* Past Numbers */
.past-numbers-container {
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.past-numbers-label {
    font-size: 11px;
    color: #667eea;
    font-weight: bold;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.past-numbers-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.past-numbers-scroll::-webkit-scrollbar {
    height: 6px;
}

.past-numbers-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.past-numbers-scroll::-webkit-scrollbar-thumb {
    background: #FFB4C8;
    border-radius: 10px;
}

.past-numbers {
    display: flex;
    gap: 8px;
    padding: 5px 0;
}

.past-number {
    min-width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #FFE4E9 0%, #FFD1DC 100%);
    border: 2px solid #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: #FF6B9D;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease-out;
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #FFB4C8;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: #FF6B9D;
    transition: all 0.3s;
    z-index: 10;
}

.scroll-btn:hover {
    background: #FFB4C8;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn.left {
    left: 10px;
}

.scroll-btn.right {
    right: 10px;
}

/* Buy Tickets Section */
.buy-tickets-section {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 4px solid #fff;
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 20px;
    color: #667eea;
    text-align: center;
    margin-bottom: 15px;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
}

.tickets-remaining {
    text-align: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.tickets-remaining strong {
    color: #FF6B9D;
    font-size: 18px;
}

.buy-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-selector {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-ticket-count {
    flex: 1;
    padding: 12px;
    border: 3px solid #fff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.8);
    color: #667eea;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-ticket-count:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-ticket-count.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.btn-buy {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    border: none;
    border-radius: 15px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.btn-buy:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

.buy-amount {
    background: rgba(255, 255, 255, 0.3);
    padding: 5px 15px;
    border-radius: 10px;
}

/* My Tickets Section */
.my-tickets-section {
    margin-bottom: 20px;
}

.tickets-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
}

.no-tickets {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.6);
    border: 3px dashed #ccc;
    border-radius: 15px;
    color: #999;
    font-size: 14px;
}

/* Bingo Ticket */
.bingo-ticket {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFEEB8 100%);
    border: 5px solid #fff;
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    position: relative;
}

.bingo-ticket.winner-ticket {
    border-color: #FFD700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    animation: winnerTicketGlow 1s ease-in-out infinite;
}

.ticket-header {
    margin-bottom: 10px;
}

.column-letters {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    text-align: center;
}

.column-letters span {
    font-size: 24px;
    font-weight: bold;
    color: #FF6B9D;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.7);
}

.ticket-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.bingo-cell {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border: 3px solid #FFD1DC;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.bingo-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.bingo-cell.free {
    background: linear-gradient(135deg, #FFE4E9 0%, #FFD1DC 100%);
    color: #FF6B9D;
    font-size: 16px;
    font-weight: bold;
}

.bingo-cell.marked {
    background: linear-gradient(135deg, #FF6B9D 0%, #FF8FA3 100%);
    color: white;
    border-color: #FF6B9D;
    transform: scale(0.95);
}

.bingo-cell.marked::before {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 40px;
    color: rgba(255, 255, 255, 0.5);
    animation: starPop 0.5s ease-out;
}

.bingo-cell.winning {
    animation: winningGlow 1s ease-in-out infinite;
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
}

/* Pool Info */
.pool-info {
    display: flex;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.8);
    border: 3px solid #fff;
    border-radius: 15px;
    padding: 12px 20px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pool-info .label {
    color: #667eea;
    font-weight: bold;
    margin-right: 8px;
}

.pool-info .amount,
.pool-info .count {
    color: #FF6B9D;
    font-weight: bold;
    font-size: 18px;
}

/* Control Buttons */
.control-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 15px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-speed {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    font-size: 14px;
}

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

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #fff;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: bold;
    color: #667eea;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    animation: pulse 2s ease-in-out infinite;
}

.status-dot.connected {
    background: #4CAF50;
}

.status-dot.disconnected {
    background: #f44336;
}

.status-dot.connecting {
    background: #FF9800;
}

/* Players Section */
.players-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.player-avatar {
    background: rgba(255, 255, 255, 0.6);
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s;
}

.player-avatar.active {
    background: rgba(255, 235, 238, 0.9);
    border-color: #FF6B9D;
    transform: scale(1.05);
}

.player-avatar .avatar {
    font-size: 32px;
    margin-bottom: 5px;
}

.player-avatar .player-name {
    font-size: 12px;
    color: #667eea;
    font-weight: bold;
}

/* Winner Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFEEB8 100%);
    border: 5px solid #fff;
    border-radius: 30px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    position: relative;
    animation: modalSlideIn 0.5s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 30px;
}

.winner-title {
    font-size: 36px;
    color: #FF6B9D;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.7);
    animation: bounce 1s ease-in-out infinite;
}

.winner-message {
    font-size: 20px;
    color: #667eea;
    margin-bottom: 20px;
}

.winner-pattern {
    font-size: 18px;
    color: #FF6B9D;
    font-weight: bold;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

@keyframes starPop {
    0% {
        transform: translate(-50%, -50%) scale(0) rotate(0deg);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5) rotate(180deg);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(360deg);
        opacity: 1;
    }
}

@keyframes winningGlow {
    0%, 100% {
        transform: scale(0.95);
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.8);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px rgba(255, 215, 0, 1);
    }
}

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

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

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

@keyframes winnerTicketGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 0 0 40px rgba(255, 215, 0, 1);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .game-container {
        padding: 15px;
    }

    .latest-number-display .number {
        font-size: 36px;
    }

    .bingo-cell {
        font-size: 18px;
    }

    .column-letters span {
        font-size: 18px;
    }

    .players-section {
        grid-template-columns: repeat(2, 1fr);
    }

    .control-buttons {
        flex-direction: column;
    }
}

/* ================================ */
/* Login Section */
/* ================================ */

.login-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-content {
    background: white;
    border-radius: 30px;
    padding: 60px 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-title {
    font-size: 42px;
    color: #667eea;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.btn-google {
    width: 100%;
    padding: 15px 30px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f8f8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.btn-google:active {
    transform: translateY(0);
}

.login-info {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-info p {
    font-size: 16px;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ================================ */
/* User Profile */
/* ================================ */

.user-profile {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #667eea;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.user-balance {
    font-size: 12px;
    color: #667eea;
    font-weight: bold;
}

.btn-logout {
    padding: 8px 16px;
    background: linear-gradient(135deg, #FF6B9D 0%, #C06C84 100%);
    border: none;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .login-content {
        padding: 40px 30px;
    }

    .login-title {
        font-size: 32px;
    }

    .user-profile {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 12px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
    }

    .user-name {
        font-size: 12px;
    }

    .user-balance {
        font-size: 10px;
    }

    .btn-logout {
        padding: 6px 12px;
        font-size: 11px;
    }
}
