/* Global Styles */
:root {
    --primary-bg: #e0f7fa;
    --text-dark: #2c3e50;
    --card-apple: #ffcdd2;
    --card-memo: #fff9c4;
    --card-locked: #e0e0e0;
    --accent: #ff4081;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Animated Shapes */
.background-shapes {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    animation: float 10s infinite alternate ease-in-out;
}

.circle-1 {
    width: 200px; height: 200px; border-radius: 50%;
    top: 10%; left: 5%; background: rgba(255, 105, 180, 0.2);
}

.circle-2 {
    width: 300px; height: 300px; border-radius: 50%;
    bottom: 5%; right: 5%; background: rgba(255, 235, 59, 0.2);
    animation-duration: 15s;
}

.square-1 {
    width: 150px; height: 150px; border-radius: 20px;
    top: 40%; right: 15%; background: rgba(33, 150, 243, 0.2);
    transform: rotate(45deg);
    animation-duration: 12s;
}

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

/* Header */
.main-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    animation: slideDown 0.8s ease-out;
}

.main-header h1 {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent);
    text-shadow: 2px 2px 0 #000, 6px 6px 0 rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

.main-header p {
    font-size: 1.5rem;
    font-weight: 700;
    color: #455a64;
}

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

/* Games Grid */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    max-width: 1200px;
    flex-grow: 1;
}

/* Game Cards */
.game-card {
    text-decoration: none;
    color: inherit;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    backdrop-filter: blur(10px);
    border: 3px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(255,255,255,0) 100%);
    z-index: 1;
}

.game-card > * {
    position: relative;
    z-index: 2;
}

.game-card:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: #fff;
}

.card-apple { background-color: #ffcdd2; }
.card-memo { background-color: #fff9c4; }
.bg-red { background-color: #ffcdd2; }
.bg-yellow { background-color: #fff9c4; }
.bg-blue { background-color: #bbdefb; }
.bg-green { background-color: #c8e6c9; }
.bg-purple { background-color: #e1bee7; }
.bg-orange { background-color: #ffe0b2; }
.bg-pink { background-color: #f8bbd0; }
.bg-cyan { background-color: #b2ebf2; }
.bg-lime { background-color: #f0f4c3; }
.bg-indigo { background-color: #c5cae9; }
.bg-teal { background-color: #b2dfdb; }
.bg-amber { background-color: #ffecb3; }
.bg-brown { background-color: #d7ccc8; }
.bg-light-blue { background-color: #b3e5fc; }
.bg-deep-purple { background-color: #d1c4e9; }
.bg-deep-orange { background-color: #ffccbc; }
.bg-light-green { background-color: #dcedc8; }
.bg-blue-grey { background-color: #cfd8dc; }
.card-memo { background-color: var(--card-memo); }
.card-locked { background-color: var(--card-locked); cursor: not-allowed; opacity: 0.8; filter: grayscale(0.5); }
.card-locked:hover { transform: none; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

.game-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 5px 5px rgba(0,0,0,0.1));
    transition: transform 0.3s;
}

.game-card:hover .game-icon {
    transform: scale(1.2) rotate(10deg);
}
.card-locked:hover .game-icon {
    transform: none;
}

.game-info h2 {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.game-info p {
    font-size: 1.1rem;
    font-weight: 400;
}

/* Footer */
footer {
    padding: 2rem;
    text-align: center;
    font-weight: 700;
    color: #78909c;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header h1 { font-size: 3rem; }
    .main-header p { font-size: 1.2rem; }
    .games-container { padding: 1rem; }
}
