:root { 
    --bg-gradient: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    --pink: #ff4081; 
    --blue: #40c4ff; 
    --yellow: #ffd740; 
    --green: #4caf50;
    --text-dark: #333333;
    --text-muted: #666666;
}
        
* {
    box-sizing: border-box;
    margin: 0; 
    padding: 0;
}

body { 
    font-family: 'Nunito', 'Arial Rounded MT Bold', sans-serif; 
    background: var(--bg-gradient); 
    background-attachment: fixed;
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Pohyblivé pozadí - bubliny / hvězdičky pro děti */
.stars-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(255, 64, 129, 0.05) 50px, transparent 51px),
        radial-gradient(circle at 85% 30%, rgba(64, 196, 255, 0.06) 80px, transparent 81px),
        radial-gradient(circle at 50% 80%, rgba(255, 215, 64, 0.08) 100px, transparent 101px);
}

/* Hlavička stránky */
.main-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    animation: slideDown 0.8s ease-out;
}

.logo-emoji {
    font-size: 5rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.1));
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

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

.main-header h1 {
    font-size: 3.5rem;
    color: var(--pink);
    text-shadow: 2px 2px 0px rgba(255,192,203,0.5);
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.main-header p {
    font-size: 1.5rem;
    color: var(--text-muted);
    font-weight: 700;
}

/* Mřížka her */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    padding: 2rem;
    flex-grow: 1;
}

/* Karta hry */
.game-card {
    background: white;
    border-radius: 30px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    border: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: zoomIn 0.6s ease-out backwards;
}

.games-grid .game-card:nth-child(1) { animation-delay: 0.1s; }
.games-grid .game-card:nth-child(2) { animation-delay: 0.2s; }
.games-grid .game-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.game-card:active {
    transform: translateY(-2px) scale(0.98);
}

/* Varianty barev karet */
.card-pink:hover { border-color: rgba(255, 64, 129, 0.3); }
.card-blue:hover { border-color: rgba(64, 196, 255, 0.3); }
.card-yellow:hover { border-color: rgba(255, 215, 64, 0.3); }

/* Ikona na kartě */
.card-icon {
    font-size: 6rem;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 24px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    overflow: visible;
}

/* Nové pravidlo pro png obrázky ikon */
.card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.game-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.btn-settings {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-settings:active {
    transform: rotate(45deg) scale(0.9);
}

.card-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.card-content p {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Notifikace na kartě - štítky */
.card-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background: var(--pink);
    color: white;
    font-weight: 900;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(255, 64, 129, 0.4);
    transform: rotate(5deg);
}

#welcome-text.gender-f { color: var(--pink); }
#welcome-text.gender-m { color: var(--blue); }

.badge-soon {
    background: #ccc;
    color: #fff;
    box-shadow: none;
    transform: rotate(-5deg);
}

/* Patička */
.main-footer {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: auto;
}

/* Overlay - zadávání jména */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
    padding: 20px;
}

.modal-card {
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 3rem;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
    text-align: center;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 8px solid var(--blue);
}

@keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-card h2 {
    color: var(--pink);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.input-name {
    width: 100%;
    font-size: 2rem;
    padding: 15px 25px;
    border-radius: 25px;
    border: 4px solid #eee;
    background: #f9f9f9;
    font-family: 'Nunito', sans-serif;
    text-align: center;
    color: var(--text-dark);
    outline: none;
    transition: all 0.3s;
    margin-bottom: 2rem;
}

.input-name:focus {
    border-color: var(--blue);
    background: white;
    box-shadow: 0 0 20px rgba(64, 196, 255, 0.2);
}

.btn-icon-submit {
    background: none;
    border: none;
    padding: 0;
    width: 120px;
    height: 120px;
    cursor: pointer;
    transition: transform 0.3s;
    display: inline-block;
}

.btn-icon-submit:hover {
    transform: scale(1.1) rotate(5deg);
}

.btn-icon-submit:active {
    transform: scale(0.9);
}

.btn-icon-submit img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Responsivita */
@media (max-width: 600px) {
    .main-header h1 { font-size: 2.5rem; }
    .main-header p { font-size: 1.2rem; }
    .games-grid { padding: 1rem; gap: 1.5rem; }
    .game-card { padding: 1.5rem; }
    .card-icon { width: 100px; height: 100px; font-size: 4rem; }
    .modal-card { padding: 2rem; border-radius: 30px; }
    .modal-card h2 { font-size: 2rem; }
    .btn-icon-submit { width: 100px; height: 100px; }
}

/* Nastavení v modalu */
.settings-section {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: center;
}

.gender-toggle {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 10px;
}

.btn-gender {
    background: #f5f5f5;
    border: 3px solid transparent;
    border-radius: 20px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    width: 120px;
}

.btn-gender:hover { background: #eee; }
.btn-gender.active {
    background: #fff;
    border-color: var(--pink);
    box-shadow: 0 10px 20px rgba(255, 64, 129, 0.15);
    transform: scale(1.05);
}
#gender-m.active { border-color: var(--blue); }

.btn-delete-all {
    background: #fff1f1;
    color: #d32f2f;
    border: 2px solid #ffcdd2;
    border-radius: 15px;
    padding: 10px 20px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-delete-all:hover {
    background: #ffebee;
    transform: scale(1.02);
}
