:root {
    --bg-color: #f0f2f5;
    --card-bg: #ffffff;
    --text-color: #333333;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --btn-bg: #007bff;
    --btn-hover: #0056b3;
    --btn-active: #004a99;
}

.dark-mode {
    --bg-color: #18191a;
    --card-bg: #242526;
    --text-color: #e4e6eb;
    --shadow-color: rgba(0, 0, 0, 0.4);
    --btn-bg: #2d88ff;
    --btn-hover: #1a73e8;
    --btn-active: #155db5;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.landing {
    text-align: center;
}

.hero {
    margin-bottom: 40px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1519389950473-47ba0277781c?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 80px 20px;
    border-radius: 16px;
    color: white;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    color: #e0e0e0;
    font-size: 1.2rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

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

.service-card {
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s;
}

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

.lotto-machine {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px var(--shadow-color);
    text-align: center;
    width: 90%;
    max-width: 600px;
    position: relative;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

h1 {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px var(--shadow-color);
}

.nav-logo {
    font-weight: bold;
    font-size: 1.5rem;
    color: var(--text-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 1rem;
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

#lang-selector {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.25rem;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* Toggle Switch */
.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.number-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 2rem;
    min-height: 300px; /* Prevent jumping */
}

.lotto-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    background-color: rgba(128, 128, 128, 0.05);
    border-radius: 10px;
    animation: fade-in 0.5s ease-out backwards;
}

.number-ball {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.comments-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    min-height: 200px;
}

#generator-btn, #recommend-btn {
    background-color: var(--btn-bg);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    width: 100%;
}

#generator-btn:hover, #recommend-btn:hover {
    background-color: var(--btn-hover);
    transform: translateY(-2px);
}

#generator-btn:active, #recommend-btn:active {
    transform: translateY(1px);
    background-color: var(--btn-active);
}

@keyframes pop-in {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.food-display {
    margin-bottom: 2rem;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.food-image-container {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background-color: rgba(128, 128, 128, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.food-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: fade-in 0.5s ease-out;
}

.placeholder-text {
    font-size: 5rem;
    color: var(--text-color);
    opacity: 0.2;
}

.food-name {
    font-size: 2rem;
    margin: 0.5rem 0;
    color: var(--text-color);
}

.food-category {
    font-size: 1.2rem;
    color: var(--text-color);
    opacity: 0.7;
    margin-bottom: 1rem;
}

.service-icon {
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Side Panel Layout */
.content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: flex-start;
}

.side-panel {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.info-box {
    background-color: rgba(128, 128, 128, 0.1); /* Grayish box */
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px var(--shadow-color);
    text-align: left;
}

.info-box h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--btn-bg);
    padding-bottom: 0.5rem;
    display: inline-block;
    color: var(--text-color);
}

.update-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.update-list li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-color);
}

.update-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--btn-bg);
    font-weight: bold;
}

/* Winning Numbers Styles */
.winning-numbers-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

.winning-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(128,128,128,0.2);
}

.winning-round {
    font-weight: bold;
    color: var(--btn-bg);
    font-size: 0.9rem;
    margin-right: 10px;
}

.winning-balls {
    display: flex;
    gap: 4px;
}

.mini-ball {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Scrollbar for winning list */
.winning-numbers-list::-webkit-scrollbar {
    width: 6px;
}
.winning-numbers-list::-webkit-scrollbar-thumb {
    background-color: rgba(128,128,128,0.4);
    border-radius: 3px;
}