:root {
    --bg-color: #f0f2f5;
    --bg-gradient: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
    --container-bg: #ffffff;
    --text-color: #333;
    --number-bg: #f8f9fa;
    --number-border: #dee2e6;
    --number-text: #495057;
    --history-bg: #f8f9fa;
    --history-item-bg: #fff;
    --history-border: #eee;
    --tab-active-bg: #007bff;
    --tab-inactive-bg: #e9ecef;
}

body.dark-mode {
    --bg-color: #1a1a1a;
    --bg-gradient: linear-gradient(120deg, #2c3e50 0%, #000000 100%);
    --container-bg: #2d2d2d;
    --text-color: #e0e0e0;
    --number-bg: #3d3d3d;
    --number-border: #4d4d4d;
    --number-text: #e0e0e0;
    --history-bg: #3d3d3d;
    --history-item-bg: #2d2d2d;
    --history-border: #444;
    --tab-active-bg: #0056b3;
    --tab-inactive-bg: #444;
}

body {
    font-family: 'Helvetica Neue', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding-top: 80px;
    background-image: var(--bg-gradient);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.top-controls {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

#theme-toggle, #lang-toggle {
    background: var(--container-bg);
    border: 1px solid var(--number-border);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--text-color);
}

#theme-toggle:hover, #lang-toggle:hover {
    transform: scale(1.1);
}

.container {
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 90%;
    transition: transform 0.3s ease-in-out, background-color 0.3s ease;
    position: relative;
    margin-bottom: 50px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    justify-content: center;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    background-color: var(--tab-inactive-bg);
    color: var(--text-color);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: var(--tab-active-bg);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h1 {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 2rem 0;
}

.number {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: var(--number-bg);
    border: 2px solid var(--number-border);
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--number-text);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

#generate-btn {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

.history {
    margin-top: 2rem;
    text-align: left;
    background: var(--history-bg);
    padding: 1rem;
    border-radius: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.comments-section {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--history-bg);
    border-radius: 10px;
    text-align: left;
    border: 1px solid var(--history-border);
}

body.dark-mode .comments-section {
    background: #ffffff; /* Disqus best on light background */
    color: #333;
}

body.dark-mode .comments-section h2 {
    color: #333;
    border-bottom: 2px solid #eee;
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--number-border);
    border-radius: 5px;
    background-color: var(--history-item-bg);
    color: var(--text-color);
    box-sizing: border-box;
}

#submit-btn {
    width: 100%;
    background: linear-gradient(45deg, #28a745, #218838);
    color: white;
    border: none;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
}

.upload-area {
    margin: 2rem 0;
    padding: 2rem;
    border: 2px dashed var(--number-border);
    border-radius: 15px;
    background: var(--history-bg);
}

#upload-btn {
    background: var(--tab-active-bg);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

#image-preview {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    margin-top: 1rem;
}

#result-container {
    margin-top: 2rem;
    text-align: left;
}

.result-bar-container {
    margin-bottom: 1rem;
}

.result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.result-bar-bg {
    background: var(--tab-inactive-bg);
    height: 15px;
    border-radius: 10px;
    overflow: hidden;
}

.result-bar-fill {
    height: 100%;
    background: var(--tab-active-bg);
    width: 0%;
    transition: width 0.5s ease;
}

@media (max-width: 480px) {
    .number {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    h1 {
        font-size: 2rem;
    }
}
