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

body {
    font-family: 'Comic Sans MS', 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 50%, #ffecd2 100%);
    min-height: 100vh;
    padding: 20px;
    transition: background 0.5s ease;
}

body.theme-purple {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 50%, #ffecd2 100%);
}

body.theme-rainbow {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 20%, #ffecd2 40%, #a6e9ff 60%, #d4a5ff 80%, #ffa5d8 100%);
}

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

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

.unicorn-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    margin-bottom: 20px;
    user-select: none;
}

.unicorn-glasses {
    position: absolute;
    top: 40%;
    left: 55%;
    transform: translate(calc(-50% + 40px), -50%) scaleX(-1);
    width: 120px;
    height: 60px;
    background-image: url('pixel-glasses.png');
    background-size: 480px 300px;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    pointer-events: none;
    z-index: 10;
}

.unicorn-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    object-position: center 0px;
    animation: bounce 2s infinite;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(255, 107, 157, 0.4);
    transition: transform 0.3s ease;
}

.unicorn-image:hover {
    transform: scale(1.05);
}

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

h1 {
    font-size: 3em;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
}

.date {
    font-size: 1.2em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Balloons */
.balloons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.balloons.hidden {
    display: none;
}

.balloon {
    position: absolute;
    font-size: 60px;
    animation: float 6s ease-in-out infinite;
}

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

/* Nickname Section */
.nickname-section {
    text-align: center;
    margin-bottom: 30px;
}

.nickname-section h2 {
    font-size: 2em;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Sections */
section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

section h3 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ff6b9d;
    text-align: center;
}

/* Photo of the Day Section */
.gif-container {
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.gif-container img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.photo-caption {
    margin-top: 15px;
    font-size: 1.1em;
    color: #555;
    padding: 10px 20px;
    background: rgba(255, 107, 157, 0.1);
    border-radius: 10px;
    border-left: 4px solid #ff6b9d;
    max-width: 600px;
}

/* Joke Section */
.joke-container {
    text-align: center;
}

#jokeText {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding: 20px;
    background: #fff3f8;
    border-radius: 15px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#newJokeBtn {
    background: #ff6b9d;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

#newJokeBtn:hover {
    background: #ff4081;
    transform: scale(1.05);
}

/* Tic Tac Toe Game */
.tictactoe-section {
    text-align: center;
}

.game-mode-selector {
    margin-bottom: 20px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.mode-btn {
    background: #e0e0e0;
    color: #333;
    border: 3px solid transparent;
    padding: 12px 25px;
    font-size: 1.1em;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
}

.mode-btn.active {
    background: #ff6b9d;
    color: white;
    border-color: #ff4081;
}

.mode-btn:hover {
    transform: scale(1.05);
}

.game-status {
    margin-bottom: 20px;
}

.game-status p {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff6b9d;
}

.tictactoe-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 0 auto 20px;
    padding: 20px;
    background: rgba(255, 107, 157, 0.1);
    border-radius: 20px;
}

.cell {
    aspect-ratio: 1;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    user-select: none;
}

.cell:hover:not(.taken) {
    background: #fff3f8;
    transform: scale(1.05);
}

.cell.taken {
    cursor: not-allowed;
}

.cell.winner {
    background: #ffd700;
    animation: pulse 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.reset-game-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: bold;
}

.reset-game-btn:hover {
    background: #5568d3;
    transform: scale(1.05);
}

/* Spotify Cards */
.spotify-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.spotify-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.spotify-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.spotify-card img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
}

.spotify-card h4 {
    font-size: 1em;
    margin-bottom: 5px;
    color: #333;
}

.spotify-card p {
    font-size: 0.9em;
    color: #666;
}

.spotify-player {
    margin-top: 20px;
}

.spotify-player.hidden {
    display: none;
}

/* Games Section */
.game-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.game-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.game-card div:last-child {
    font-size: 1.3em;
    font-weight: bold;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.3);
    transition: right 0.3s ease;
    z-index: 2000;
    padding: 30px;
    overflow-y: auto;
}

.settings-panel.active {
    right: 0;
}

.settings-panel.hidden {
    display: none;
}

.settings-content h3 {
    margin-bottom: 30px;
    color: #ff6b9d;
    text-align: center;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    transition: transform 0.2s ease;
}

.close-btn:hover {
    transform: rotate(90deg);
    color: #ff6b9d;
}

.setting-group {
    margin-bottom: 25px;
}

.setting-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

.setting-group input,
.setting-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ff6b9d;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
}

.glasses-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 10px;
    background: rgba(255, 107, 157, 0.05);
    border-radius: 15px;
}

.glasses-option {
    background: white;
    border: 3px solid transparent;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
}

.glasses-option:hover {
    transform: scale(1.1);
    border-color: #ff6b9d;
    background: #fff3f8;
}

.glasses-option.selected {
    border-color: #ff6b9d;
    background: linear-gradient(135deg, #fff3f8 0%, #ffe8f0 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
}

.glasses-pixel {
    width: 50px;
    height: 25px;
    background-image: url('pixel-glasses.png');
    background-size: 200px 125px;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.save-btn {
    width: 100%;
    background: #ff6b9d;
    color: white;
    border: none;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.save-btn:hover {
    background: #ff4081;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #ff6b9d;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ff6b9d;
    border-radius: 10px;
    font-size: 1em;
    margin-bottom: 20px;
}

.modal-content button {
    background: #ff6b9d;
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 10px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.modal-content button:hover {
    background: #ff4081;
}

/* Floating Navigation Menu */
.floating-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1500;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50%) translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.nav-item {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(255, 107, 157, 0.4);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    cursor: pointer;
    border: 3px solid transparent;
}

.nav-item:hover {
    transform: scale(1.2) rotate(10deg);
    box-shadow: 0 8px 20px rgba(255, 107, 157, 0.6);
    border-color: #ff6b9d;
    background: linear-gradient(135deg, #fff 0%, #ffe8f0 100%);
}

.nav-item::before {
    content: attr(title);
    position: absolute;
    right: 75px;
    background: #ff6b9d;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.5em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-item:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-item:nth-child(1) {
    animation: floatNav 3s ease-in-out infinite;
    animation-delay: 0s;
}

.nav-item:nth-child(2) {
    animation: floatNav 3s ease-in-out infinite;
    animation-delay: 0.2s;
}

.nav-item:nth-child(3) {
    animation: floatNav 3s ease-in-out infinite;
    animation-delay: 0.4s;
}

.nav-item:nth-child(4) {
    animation: floatNav 3s ease-in-out infinite;
    animation-delay: 0.6s;
}

.nav-item:nth-child(5) {
    animation: floatNav 3s ease-in-out infinite;
    animation-delay: 0.8s;
}

@keyframes floatNav {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-8px) rotate(-5deg);
    }
}

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

/* Section scroll animation */
section {
    scroll-margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    .unicorn-image {
        width: 200px;
        height: 200px;
    }

    section {
        padding: 20px;
    }

    section h3 {
        font-size: 1.5em;
    }

    .settings-panel {
        width: 100%;
        right: -100%;
    }

    .spotify-cards {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .floating-nav {
        right: 10px;
        gap: 10px;
    }

    .nav-item {
        width: 50px;
        height: 50px;
        font-size: 1.5em;
    }

    .nav-item::before {
        font-size: 0.45em;
        right: 60px;
    }
}

.hidden {
    display: none !important;
}
