* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: #fff; min-height: 100vh; overflow-x: hidden; }
.header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: rgba(255,255,255,0.05); }
.logo { font-size: 1.5rem; font-weight: bold; color: #4CAF50; }
#auth-section { display: flex; gap: 0.5rem; align-items: center; }
.user-name { font-size: 0.9rem; opacity: 0.9; }

/* Search Section */
.search-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.05);
    margin: 0.5rem;
    border-radius: 15px;
}

.location-input {
    padding: 1rem;
    border: 2px solid rgba(76, 175, 80, 0.3);
    border-radius: 10px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.location-input:focus {
    outline: none;
    border-color: #4CAF50;
    background: rgba(255,255,255,0.15);
}

.location-input::placeholder {
    color: rgba(255,255,255,0.5);
}

.btn-search {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: #fff;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.btn-location {
    background: rgba(33, 150, 243, 0.2);
    border: 2px solid #2196F3;
    color: #2196F3;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

.btn-location:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: #42a5f5;
}

@media (min-width: 600px) {
    .search-section {
        flex-direction: row;
        align-items: center;
    }

    .location-input {
        flex: 1;
    }

    .btn-search {
        flex-shrink: 0;
    }

    .btn-location {
        flex-shrink: 0;
    }
}

#sport-indicator { text-align: center; font-size: 1.5rem; padding: 1rem; background: rgba(255,255,255,0.1); margin: 0.5rem; border-radius: 10px; }
#card-container { display: flex; justify-content: center; align-items: center; min-height: 60vh; padding: 1rem; }
.game-card { background: linear-gradient(145deg, #2a2a4a, #1a1a3a); border-radius: 20px; padding: 2rem; width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(0,0,0,0.3); position: relative; transition: transform 0.3s ease; cursor: pointer; }
.game-card:hover { transform: translateY(-5px); box-shadow: 0 15px 50px rgba(0,0,0,0.4); }
.game-card.empty { text-align: center; opacity: 0.7; }
.game-card .card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.sport-icon { font-size: 2.5rem; }
.sport-icon.large { font-size: 4rem; }
.source-badge { padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.source-badge.user_post { background: #4CAF50; }
.source-badge.google_places, .source-badge.known_venue { background: #2196F3; }
.game-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.game-address { opacity: 0.7; margin-bottom: 0.5rem; }
.game-date { color: #4CAF50; font-weight: bold; }
.spots { color: #FF9800; }
.rating { color: #FFD700; }
.status { color: #4CAF50; font-weight: bold; }
.distance { opacity: 0.6; font-size: 0.9rem; }
.card-footer { display: flex; justify-content: space-between; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); }
.hint { font-size: 0.75rem; opacity: 0.5; }
.card-counter { position: absolute; bottom: 0.5rem; right: 1rem; font-size: 0.8rem; opacity: 0.5; }
.slide-in-left { animation: slideInLeft 0.3s ease; }
.slide-in-right { animation: slideInRight 0.3s ease; }
@keyframes slideInLeft { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideInRight { from { transform: translateX(-100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
button { cursor: pointer; border: none; padding: 0.5rem 1rem; border-radius: 5px; font-size: 0.9rem; transition: all 0.2s ease; }
.btn-login { background: transparent; border: 1px solid #4CAF50; color: #4CAF50; }
.btn-signup { background: #4CAF50; color: #fff; }
.btn-logout { background: transparent; border: 1px solid #f44336; color: #f44336; }
.btn-primary { background: #4CAF50; color: #fff; width: 100%; padding: 1rem; font-size: 1rem; margin-top: 1rem; }
.btn-large { font-size: 1.2rem; padding: 1rem 2rem; }
button:hover { opacity: 0.9; transform: translateY(-2px); }
#auth-modal, #detail-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; }
.modal-content { background: #2a2a4a; padding: 2rem; border-radius: 15px; width: 90%; max-width: 400px; position: relative; }
.modal-content.detail { max-width: 500px; }
.close { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; cursor: pointer; opacity: 0.7; }
.close:hover { opacity: 1; }
.modal-content h2 { margin-bottom: 1rem; text-align: center; }
.modal-content form { display: flex; flex-direction: column; gap: 1rem; }
.modal-content input { padding: 1rem; border: none; border-radius: 8px; background: rgba(255,255,255,0.1); color: #fff; font-size: 1rem; }
.modal-content input::placeholder { color: rgba(255,255,255,0.5); }
.switch-auth { text-align: center; margin-top: 1rem; font-size: 0.9rem; opacity: 0.7; }
.switch-auth a { color: #4CAF50; text-decoration: none; }
.action-hint { text-align: center; opacity: 0.7; margin-bottom: 1rem; }
.detail-header { text-align: center; margin-bottom: 1.5rem; }
.detail-body p { margin-bottom: 0.8rem; padding: 0.5rem; background: rgba(255,255,255,0.05); border-radius: 5px; }
#loading { 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: 999; }
.spinner { width: 50px; height: 50px; border: 4px solid rgba(255,255,255,0.3); border-top-color: #4CAF50; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); padding: 1rem 2rem; border-radius: 10px; background: #4CAF50; color: #fff; font-weight: bold; animation: fadeInUp 0.3s ease; z-index: 1001; }
.toast.error { background: #f44336; }
.toast.info { background: #2196F3; }
@keyframes fadeInUp { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 480px) { .game-card { padding: 1.5rem; } .game-title { font-size: 1.2rem; } }
