:root {
    --primary-color: #ff477e;
    --secondary-color: #00d2ff;
    --accent-color: #ffbe0b;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --card-bg: #ffffff;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 15px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 15px 20px;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 50px;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

.highlight {
    color: var(--accent-color);
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
}

.widgets-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 20px;
}

.side-menu-wrapper {
    flex: 1;
    min-width: 320px;
    text-align: center;
}

.side-menu-wrapper h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.side-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, 150px);
    justify-content: center;
    gap: 15px;
}

.side-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    transition: background-color 0.2s, transform 0.2s;
    border: none;
    cursor: pointer;
    width: 150px;
    height: 150px;
    border-radius: 15px;
    text-decoration: none;
    font-weight: bold;
    color: white;
}

.side-btn:hover {
    animation: flash 0.3s infinite;
    transform: scale(1.05);
}

.snake-btn {
    background-color: var(--secondary-color);
}

.fruit-btn {
    background-color: #9b59b6;
}

.fruit-btn:hover {
    background-color: #8e44ad;
}

.yt-btn {
    background-color: #ff0000;
}

.yt2-btn {
    background-color: #f39c12;
}

.like-btn {
    background-color: #27ae60;
}

.like-btn .thumb {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.like-btn .count {
    margin-top: 5px;
    font-weight: bold;
    font-size: 1.2rem;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
}

.right-zone {
    flex: 0 1 300px;
}

.joke-widget {
    background: var(--card-bg);
    border: 3px solid var(--secondary-color);
    padding: 20px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#joke-text-home {
    margin: 15px 0;
    font-size: 1.1rem;
    color: var(--text-color);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.full-screen-image {
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    width: 100%;
    padding: 20px 0;
}

.image-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 100%;
    transition: transform 0.3s ease;
}

.image-link:hover {
    transform: scale(1.02);
}

.full-screen-image img {
    max-width: 95%;
    max-height: 60vh;
    height: auto;
    object-fit: contain;
    display: block;
    cursor: pointer;
}

.click-instruction {
    margin-top: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

/* Sketchpad Styles */
.sketchpad-container {
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
}

#sketchpad {
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    cursor: crosshair;
    width: 100%;
    max-width: 800px;
    height: auto;
    touch-action: none; /* Prevent scrolling while drawing on mobile */
}

.sketchpad-controls {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.color-palette {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: #f1f1f1;
    border-radius: 30px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: transform 0.2s;
}

.color-option:hover {
    transform: scale(1.2);
}

.color-option.active {
    border-color: var(--secondary-color);
    transform: scale(1.1);
}

.gallery {
    margin-top: 40px;
    text-align: center;
}

.gallery h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.saved-sketch {
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    padding: 5px;
}

.saved-sketch img {
    width: 100%;
    height: auto;
}

/* Heart Animation Styles */
.heart {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    z-index: 999;
    animation: flyUp 2s ease-out forwards;
}

@keyframes flyUp {
    0% {
        transform: translate(0, 0) scale(0.5);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(1.5) rotate(var(--tr));
        opacity: 0;
    }
}

@keyframes flash {
    0% { background-color: var(--secondary-color); color: white; }
    50% { background-color: var(--accent-color); color: black; }
    100% { background-color: var(--secondary-color); color: white; }
}

footer {
    text-align: center;
    padding: 40px 20px;
    background: #333;
    color: white;
    margin-top: 60px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-20px);}
    60% {transform: translateY(-10px);}
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    .side-menu {
        grid-template-columns: repeat(2, 1fr);
    }
    .side-btn {
        width: 100%;
        height: 140px;
    }
    .full-screen-image {
        min-height: auto;
    }
}