:root {
    --bg-color: #f2f4f6;
    --container-bg: #ffffff;
    --text-primary: #191f28;
    --text-secondary: #4e5968;
    --button-bg: #0064ff;
    --button-hover: #0056db;
    --card-shadow: rgba(0, 0, 0, 0.04) 0px 4px 16px 0px;
    --border-color: #e5e8eb;
    --bonus-color: #ff4d4f;
}

[data-theme="dark"] {
    --bg-color: #101012;
    --container-bg: #1c1c1e;
    --text-primary: #f2f4f6;
    --text-secondary: #adb5bd;
    --button-bg: #0064ff;
    --card-shadow: rgba(0, 0, 0, 0.2) 0px 4px 16px 0px;
    --border-color: #2c2c2e;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    transition: background-color 0.3s ease;
}

.container {
    width: 100%;
    max-width: 500px;
    background: var(--container-bg);
    padding: 40px 24px;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    position: relative;
    text-align: center;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--bg-color);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.theme-toggle:active {
    transform: scale(0.95);
}

h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.lotto-sets {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.lotto-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background-color: var(--bg-color);
    border-radius: 16px;
    transition: background-color 0.3s ease;
}

.numbers-group {
    display: flex;
    gap: 8px;
}

.lotto-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.bonus-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 8px;
    border-left: 1px solid var(--border-color);
}

.bonus-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--bonus-color);
    margin-bottom: 2px;
}

.lotto-number.bonus {
    background-color: var(--bonus-color) !important;
}

#generate {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    border-radius: 16px;
    background-color: var(--button-bg);
    color: white;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#generate:hover {
    background-color: var(--button-hover);
}

#generate:active {
    transform: scale(0.98);
}

.divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 40px 0;
}

.partnership-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: left;
}

.partnership-section .subtitle {
    text-align: left;
    margin-bottom: 24px;
}

.inquiry-form {
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--button-bg);
    box-shadow: 0 0 0 3px rgba(0, 100, 255, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    background-color: var(--bg-color);
    color: var(--button-bg);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.submit-btn:hover {
    background-color: var(--border-color);
}

.comment-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: left;
}

#disqus_thread {
    margin-top: 16px;
}

.animal-section h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: left;
}

.animal-section .subtitle {
    text-align: left;
    margin-bottom: 24px;
}

.animal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.file-upload-wrapper {
    width: 100%;
}

#image-upload {
    display: none;
}

.upload-btn {
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 16px;
    background-color: var(--button-bg);
    color: white;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.upload-btn:hover {
    background-color: var(--button-hover);
}

#face-image {
    width: 100%;
    max-width: 300px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    margin: 10px 0;
}

#label-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.prediction-bar-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.prediction-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.prediction-bar-container {
    width: 100%;
    height: 12px;
    background-color: var(--bg-color);
    border-radius: 6px;
    overflow: hidden;
}

.prediction-bar-value {
    height: 100%;
    background-color: var(--button-bg);
    width: 0%;
    transition: width 0.3s ease;
}

.loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.analysis-progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
}

.analysis-progress-value {
    height: 100%;
    background-color: var(--button-bg);
    width: 0%;
    border-radius: 4px;
}

@keyframes progressAnimation {
    0% { width: 0%; }
    100% { width: 100%; }
}

.animate-progress {
    animation: progressAnimation 2s ease-in-out forwards;
}

@media (max-width: 400px) {
    .lotto-row {
        flex-direction: column;
        gap: 12px;
    }
    .bonus-group {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 8px;
        width: 100%;
        justify-content: center;
    }
}
