body {
    margin: 0;
    font-family: 'Comic Sans MS',-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #f9f9f9;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

#navigation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem auto 0;
    width: 70%;
    max-width: 1200px;
}

.nav-card {
    width: 100%;
    max-width: 100%;
}

.nav-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.nav-card:hover {
    transform: translateY(-5px);
}

h1 {
    font-size: 4rem;
    background: linear-gradient(45deg, #ff6f61, #ffcc00);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    margin: 2rem 0 3rem 0;
    text-align: center;
    transition: all 0.3s ease;
}

h1:hover {
    transform: scale(1.05);
    text-shadow: 4px 4px 6px rgba(0,0,0,0.3);
}

.nav-card h3 {
    color: #ff6f61;
    margin-bottom: 0.5rem;
}

.nav-card p {
    color: #666;
}

.slideshow-container {
    width: 80%;
    height: 80vh;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.word-display {
    font-size: 9rem;
    color: #ff6f61;
    font-weight: bold;
    letter-spacing: 0.2rem;
    padding: 1rem;
    min-width: 300px;
    width: auto;
    display: inline-block;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.word-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.image-container {
    margin-top: 1rem;
}

.word-image {
    max-width: 300px;
    height: auto;
    border-radius: 15px;
}

button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 7.5px 15px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
    margin: 4px 2px;
    cursor: pointer;
    border-radius: 12px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.prev-btn {
    margin-right: 1rem;
}

.timer-toggle-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.timer-toggle {
    background-color: rgba(255, 255, 255, 0.8) !important;
    border-radius: 50% !important;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timer-control {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 5px;
}

.timer-control label {
    font-size: 0.8rem;
    margin-right: 5px;
}

.timer-control input {
    width: 50px;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
}

.prev-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
}

.next-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.home-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #61b3ffe4;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 100;
}

.home-button:hover {
    background-color: #ff4a3d;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Base Mobile Styles */
:root {
    font-size: 14px;
}

.word-display {
    font-size: clamp(2rem, 10vw, 9rem);
    line-height: 1.2;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    word-break: break-word;
}

.word-image {
    width: 100%;
    max-width: min(80vw, 500px);
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
    margin: 0 auto;
}

button {
    padding: 12px 24px;
    min-width: 44px;
    min-height: 44px;
}

/* Tablet Breakpoint */
@media (min-width: 600px) {
    :root {
        font-size: 16px;
    }
    
    .word-display {
        font-size: 5rem;
    }
    
    .word-image {
        max-width: 300px;
    }
}

/* Desktop Breakpoint */
@media (min-width: 768px) {
    .word-display {
        font-size: 7rem;
    }
    
    .word-image {
        max-width: 400px;
    }
}

/* Large Desktop Breakpoint */
@media (min-width: 1024px) {
    .word-display {
        font-size: 9rem;
    }
    
    .word-image {
        max-width: 500px;
    }
}
