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

body {
    font-family: 'Fredoka', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #f5576c 75%, #ffc857 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Background Elements */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 12s ease-in-out infinite;
}

.shape-1 {
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
    top: 5%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(45deg, #4ecdc4, #44a3a0);
    top: 80%;
    right: 5%;
    animation-delay: 2s;
}

.shape-3 {
    width: 80px;
    height: 80px;
    background: linear-gradient(45deg, #45b7d1, #3498db);
    bottom: 30%;
    left: 15%;
    animation-delay: 4s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: linear-gradient(45deg, #96ceb4, #88b0a3);
    top: 35%;
    right: 15%;
    animation-delay: 6s;
}

.shape-5 {
    width: 90px;
    height: 90px;
    background: linear-gradient(45deg, #feca57, #f39c12);
    bottom: 5%;
    right: 35%;
    animation-delay: 8s;
}

.shape-6 {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, #ff9ff3, #ee5a6f);
    top: 15%;
    left: 40%;
    animation-delay: 10s;
}

.shape-7 {
    width: 110px;
    height: 110px;
    background: linear-gradient(45deg, #fd79a8, #e84393);
    bottom: 20%;
    left: 60%;
    animation-delay: 12s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(90deg);
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
    }
    75% {
        transform: translateY(-25px) rotate(270deg);
    }
}

/* Main Container */
.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
    z-index: 10;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    animation: slideDown 0.8s ease;
}

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

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo-icon {
    font-size: 4em;
    color: #4ecdc4;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
    animation: bounce 2s ease-in-out infinite;
}

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

.main-title {
    font-size: 3.5em;
    font-weight: 700;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
    background-size: 300% 300%;
    animation: gradientMove 8s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.subtitle {
    font-size: 1.3em;
    color: #666;
    font-weight: 600;
}

.header-decoration {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.header-decoration i {
    font-size: 2em;
    color: #feca57;
    animation: spin 4s ease-in-out infinite;
}

.header-decoration i:nth-child(2) {
    animation-delay: 1s;
    color: #ff9ff3;
}

.header-decoration i:nth-child(3) {
    animation-delay: 2s;
    color: #4ecdc4;
}

@keyframes spin {
    0%, 100% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5em;
    font-weight: 700;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.section-title i {
    color: #feca57;
    font-size: 0.9em;
}

/* Games Section */
.games-section {
    margin-bottom: 80px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

/* Game Cards */
.game-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.game-card:nth-child(1) {
    animation-delay: 0.2s;
}

.game-card:nth-child(2) {
    animation-delay: 0.4s;
}

.game-card:nth-child(3) {
    animation-delay: 0.6s;
}

.game-card:nth-child(4) {
    animation-delay: 0.8s;
}

.game-card:nth-child(5) {
    animation-delay: 1.0s;
}

.game-card:nth-child(6) {
    animation-delay: 1.2s;
}

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

.game-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 30px;
    text-align: center;
    position: relative;
}

.snap-card .card-header {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.writing-card .card-header {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.memory-card .card-header {
    background: linear-gradient(135deg, #ff9ff3, #ee5a6f);
}

.quickclick-card .card-header {
    background: linear-gradient(135deg, #fdcb6e, #f39c12);
}

.wordbuilder-card .card-header {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.picturequiz-card .card-header {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.game-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2em;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.snap-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
}

.writing-icon {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.memory-icon {
    background: linear-gradient(135deg, #ff6b9d, #ee5a6f);
}

.quickclick-icon {
    background: linear-gradient(135deg, #feca57, #f39c12);
}

.wordbuilder-icon {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
}

.picturequiz-icon {
    background: linear-gradient(135deg, #00b894, #00a085);
}

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

.game-title {
    font-size: 2em;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.game-difficulty {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.game-difficulty i {
    color: #feca57;
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Card Image */
.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.game-card:hover .card-image img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.game-card:hover .image-overlay {
    opacity: 1;
}

.image-overlay i {
    font-size: 3em;
    color: white;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.game-card:hover .image-overlay i {
    transform: scale(1);
}

/* Card Content */
.card-content {
    padding: 30px;
}

.game-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}

.game-features {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: rgba(240, 240, 240, 0.5);
    border-radius: 15px;
    min-width: 100px;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(78, 205, 196, 0.2);
    transform: translateY(-3px);
}

.feature i {
    font-size: 1.5em;
    color: #4ecdc4;
}

.snap-card .feature i {
    color: #ff6b6b;
}

.writing-card .feature i {
    color: #00b894;
}

.memory-card .feature i {
    color: #ff6b9d;
}

.quickclick-card .feature i {
    color: #feca57;
}

.wordbuilder-card .feature i {
    color: #a29bfe;
}

.picturequiz-card .feature i {
    color: #00b894;
}

.feature span {
    font-size: 0.9em;
    font-weight: 600;
    color: #333;
    text-align: center;
}

/* Card Footer */
.card-footer {
    padding: 30px;
    text-align: center;
    background: rgba(240, 240, 240, 0.3);
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 35px;
    font-size: 1.2em;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.play-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.play-btn:hover:before {
    left: 100%;
}

.snap-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
}

.writing-btn {
    background: linear-gradient(45deg, #00b894, #00a085);
}

.memory-btn {
    background: linear-gradient(45deg, #ff6b9d, #ee5a6f);
}

.quickclick-btn {
    background: linear-gradient(45deg, #feca57, #f39c12);
}

.wordbuilder-btn {
    background: linear-gradient(45deg, #a29bfe, #6c5ce7);
}

.picturequiz-btn {
    background: linear-gradient(45deg, #00b894, #00a085);
}

.play-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.play-btn:active {
    transform: translateY(-1px);
}

/* Instructions Section */
.instructions-section {
    margin-bottom: 60px;
}

.instructions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.instruction-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.instruction-card:nth-child(1) { animation-delay: 0.6s; }
.instruction-card:nth-child(2) { animation-delay: 0.8s; }
.instruction-card:nth-child(3) { animation-delay: 1s; }
.instruction-card:nth-child(4) { animation-delay: 1.2s; }

.instruction-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.instruction-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4ecdc4, #45b7d1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5em;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.instruction-card h3 {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.instruction-card p {
    color: #666;
    line-height: 1.5;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-info p {
    color: #666;
    font-weight: 600;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-info i {
    color: #feca57;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.footer-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.footer-link:last-child {
    background: linear-gradient(45deg, #00b894, #00a085);
}

/* Creator Credit Footer */
.creator-credit {
    text-align: center;
    padding: 20px 0 0 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    animation: fadeIn 1s ease;
}

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

.made-by {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.creator-name {
    color: #4ecdc4;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.creator-name:hover {
    color: #45b7d1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.visit-site {
    font-size: 0.8em;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.visit-site:hover {
    color: #4ecdc4;
}

.creator-link {
    color: #4ecdc4;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.creator-link:hover {
    color: #45b7d1;
    border-bottom-color: #45b7d1;
}

.visit-site i {
    color: #feca57;
    font-size: 0.9em;
}

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

    .games-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .main-title {
        font-size: 2.8em;
    }

    .section-title {
        font-size: 2em;
    }
}

@media (max-width: 768px) {
    .main-container {
        padding: 20px 10px;
    }

    .header {
        padding: 30px 20px;
    }

    .main-title {
        font-size: 2.2em;
    }

    .logo-icon {
        font-size: 3em;
    }

    .section-title {
        font-size: 1.8em;
        flex-direction: column;
        gap: 10px;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .instructions-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }

    .game-card {
        margin: 0;
    }

    .card-header {
        padding: 25px 20px;
    }

    .game-title {
        font-size: 1.6em;
    }

    .game-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5em;
    }

    .card-content {
        padding: 25px 20px;
    }

    .card-footer {
        padding: 25px 20px;
    }

    .play-btn {
        padding: 15px 25px;
        font-size: 1.1em;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-links {
        flex-direction: column;
        width: 100%;
    }

    .footer-link {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .main-container {
        padding: 15px 10px;
    }

    .header {
        padding: 20px 15px;
    }

    .main-title {
        font-size: 1.6em;
    }

    .subtitle {
        font-size: 1em;
    }

    .section-title {
        font-size: 1.3em;
    }

    .game-card {
        margin: 0;
    }

    .card-header {
        padding: 20px 15px;
    }

    .game-title {
        font-size: 1.4em;
    }

    .game-description {
        font-size: 1em;
    }

    .game-features {
        flex-direction: column;
        gap: 15px;
    }

    .feature {
        min-width: auto;
        width: 100%;
    }

    .play-btn {
        padding: 12px 20px;
        font-size: 1em;
    }

    .instructions-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .instruction-card {
        padding: 25px 20px;
    }

    .footer {
        padding: 25px 20px;
    }
}

/* Loading Animation */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(78, 205, 196, 0.3);
    color: #333;
}

/* Focus Styles for Accessibility */
.play-btn:focus,
.footer-link:focus {
    outline: 3px solid #feca57;
    outline-offset: 2px;
}