/* --- Base & Global Styles --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    transition: background-color 0.4s, color 0.4s;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 10px;
}

/* --- Dark Mode (Default) --- */
body {
    background-color: #121212;
    color: #e0e0e0;
}

.card {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    border: 1px solid #2a2a2a;
}

/* Special Card Styles */
.text-card {
    text-align: left;
    line-height: 1.6;
}

.warning-card {
    background-color: #4d0000;
    border-left: 5px solid #ff4444;
}

.warning-card h2 { color: #ffcccc; }

h2 {
    color: #ffffff;
    border-bottom: 2px solid #007aff;
    padding-bottom: 10px;
    margin-top: 0;
}

/* --- Light Mode --- */
body.light-mode {
    background-color: #f0f2f5;
    color: #333;
}

body.light-mode .card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.light-mode .warning-card {
    background-color: #fff0f0;
    border-left: 5px solid #cc0000;
}

body.light-mode .warning-card h2 { color: #990000; }

body.light-mode h2 {
    color: #1a1a1a;
}

/* --- Header & Title --- */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.site-title {
    font-size: 2.2em;
    color: #ffffff;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

body.light-mode .site-title {
    color: #2c3e50;
    text-shadow: none;
}

/* --- Lotto Section --- */
.lotto-numbers {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
}

.number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6em;
    font-weight: bold;
    color: #fff;
    background-color: #333;
    box-shadow: inset 0 -3px 5px rgba(0,0,0,0.2), 0 2px 4px rgba(0,0,0,0.4);
}

/* --- Buttons --- */
button, .feature-button {
    background: linear-gradient(145deg, #007aff, #0056b3);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 122, 255, 0.3);
    text-decoration: none; /* For <a> tags styled as buttons */
    display: inline-block; /* Proper alignment */
}

button:hover, .feature-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 122, 255, 0.5);
}

/* --- Forms --- */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    text-align: left;
}

textarea, .email-input {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #444;
    background-color: #2c2c2c;
    color: #fff;
    box-sizing: border-box;
    font-size: 1em;
    margin-bottom: 15px; /* Add margin to separate fields */
}

body.light-mode textarea, body.light-mode .email-input {
    background-color: #f9f9f9;
    border-color: #ccc;
    color: #333;
}


/* --- Race Classifier Page Specifics --- */
#drop-zone {
    border: 3px dashed #007aff;
    border-radius: 12px;
    padding: 25px;
    cursor: pointer;
    position: relative;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    transition: background-color 0.3s, border-color 0.3s;
}

#drop-zone.dragover {
    background-color: rgba(0, 122, 255, 0.1);
    border-color: #0056b3;
}

#image-upload-input { display: none; }

#image-preview {
    max-width: 100%;
    max-height: 250px;
    display: none; /* Initially hidden */
    border-radius: 8px;
    margin-bottom: 15px;
}

#label-container {
    margin-top: 20px;
    font-size: 1.3em;
    font-weight: bold;
    min-height: 30px;
}

/* --- Disqus Comments --- */
.comments-section { padding-top: 15px; }

/* --- Theme Switcher --- */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-switch { position: relative; display: inline-block; width: 60px; height: 34px; }
.theme-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #4d4d4d; transition: .4s; }
.slider:before { position: absolute; content: ""; height: 26px; width: 26px; left: 4px; bottom: 4px; background-color: white; transition: .4s; }
input:checked + .slider { background-color: #ccc; } /* Dark mode background */
input:not(:checked) + .slider { background-color: #007aff; } /* Light mode background */
input:checked + .slider:before { transform: translateX(26px); }
.slider.round { border-radius: 34px; }
.slider.round:before { border-radius: 50%; }

/* --- Footer --- */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #2a2a2a;
}

.site-footer a {
    color: #007aff;
    text-decoration: none;
    margin: 0 10px;
}

body.light-mode .site-footer {
    border-top: 1px solid #e0e0e0;
}

body.light-mode .site-footer a {
    color: #0056b3;
}