/* Baby announcement background image overlay for full window */
body {
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    position: relative;
}

.background-image-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    background-image: url('/static/image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.18;
    pointer-events: none;
}

.container {
    position: relative;
    z-index: 1;
}

/* Winner prize styling */
.winner-prize {
    background: rgba(255, 245, 200, 0.85);
    border-left: 4px solid #f7b731;
    border-radius: 8px;
    margin: 1.5em 0 1em 0;
    padding: 1em 1.5em;
    font-size: 1.1em;
    color: #7a5c00;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    font-family: 'Georgia', serif;
}
#edit-name-btn {
    margin-left: 24px !important;
}
/* Edit modal styles */
#edit-modal .edit-form {
    max-width: 350px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}
#edit-modal h3 {
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #2d5a2d;
    margin-bottom: 12px;
    text-align: center;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Garamond', serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebe8 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e8ebe8;
}

header {
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(245,247,245,0.95) 100%);
    color: #2d3e2d;
    padding: 60px 40px 40px;
    text-align: center;
    position: relative;
    border-bottom: 2px solid #d4e4d4;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    height: 120px;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(139, 186, 139, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(107, 142, 107, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 50% 70%, rgba(164, 198, 164, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(90deg,
        transparent 0%,
        #d4e4d4 5%,
        transparent 10%,
        transparent 20%,
        #c9d9c9 25%,
        transparent 30%,
        transparent 70%,
        #c9d9c9 75%,
        transparent 80%,
        transparent 90%,
        #d4e4d4 95%,
        transparent 100%);
    opacity: 0.5;
}

header h1 {
    font-size: 2.8em;
    margin-bottom: 10px;
    font-weight: 400;
    font-family: 'Georgia', serif;
    font-style: italic;
    color: #2d3e2d;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

header p {
    font-size: 1.1em;
    color: #5a6b5a;
    font-family: 'Segoe UI', sans-serif;
    font-style: normal;
    position: relative;
    z-index: 1;
}

.submission-section {
    padding: 60px 40px;
    text-align: center;
}

.submission-section .form-section {
    max-width: 600px;
    margin: 0 auto;
}

.submission-section h2 {
    font-size: 2.2em;
    margin-bottom: 15px;
    color: #2d3e2d;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: 400;
}

.subtitle {
    color: #5a6b5a;
    font-size: 1.05em;
    margin-bottom: 30px;
    font-family: 'Segoe UI', sans-serif;
}

.results-area {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tabs {
    display: flex;
    background: #f5f7f5;
    border-bottom: 2px solid #d4e4d4;
}

.tab-button {
    flex: 1;
    padding: 18px;
    background: none;
    border: none;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    color: #5a6b5a;
    font-family: 'Georgia', serif;
    font-style: italic;
}

.tab-button:hover {
    background: #e8f0e8;
}

.tab-button.active {
    background: white;
    color: #2d5a2d;
    font-weight: 600;
    border-bottom: 3px solid #6b8e6b;
}

.tab-content {
    display: none;
    padding: 40px;
}

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

.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    color: #2d3e2d;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: 400;
}

#combined-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#combined-form input {
    min-width: 100%;
}

#combined-form button {
    margin-top: 10px;
}

form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

input[type="text"],
input[type="date"] {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 2px solid #d4e4d4;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s;
    font-family: 'Segoe UI', sans-serif;
    background: #fafcfa;
}

input[type="text"]:focus,
input[type="date"]:focus {
    outline: none;
    border-color: #6b8e6b;
    background: white;
    box-shadow: 0 2px 8px rgba(107, 142, 107, 0.2);
}

button[type="submit"] {
    padding: 14px 35px;
    background: linear-gradient(135deg, #6b8e6b 0%, #4a6b4a 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.35);
    background: linear-gradient(135deg, #7a9d7a 0%, #5a7b5a 100%);
}

.results-section h2 {
    color: #2d3e2d;
    margin-bottom: 25px;
    font-size: 1.8em;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: 400;
}

.names-list,
.predictions-list {
    display: grid;
    gap: 15px;
}

.name-card,
.prediction-card {
    background: linear-gradient(135deg, #fafcfa 0%, #f5f9f5 100%);
    padding: 25px;
    border-radius: 15px;
    border: 2px solid #e8f0e8;
    transition: all 0.3s;
    position: relative;
}

.name-card:hover {
    border-color: #6b8e6b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 142, 107, 0.15);
}

.name-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.name-title {
    font-size: 1.6em;
    font-weight: 400;
    color: #2d3e2d;
    font-family: 'Georgia', serif;
    font-style: italic;
}

.vote-count {
    font-size: 1.1em;
    color: #6b8e6b;
    font-weight: 600;
}

.name-meta {
    color: #5a6b5a;
    font-size: 0.95em;
    margin-bottom: 8px;
    font-family: 'Segoe UI', sans-serif;
}

.stats-box {
    background: linear-gradient(135deg, #6b8e6b 0%, #4a6b4a 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #5a7b5a;
}

.stats-box h3 {
    font-size: 1.3em;
    margin-bottom: 12px;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-weight: 400;
}

.stats-box p {
    font-size: 1.6em;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
}

.prediction-card {
    background: linear-gradient(135deg, #f5f9f5 0%, #e8f0e8 100%);
    border-color: #d4e4d4;
}

.prediction-date {
    font-size: 1.4em;
    font-weight: 500;
    color: #2d5a2d;
    margin-bottom: 8px;
    font-family: 'Georgia', serif;
}

.prediction-by {
    color: #5a6b5a;
    font-size: 0.95em;
    font-family: 'Segoe UI', sans-serif;
}

.loading {
    text-align: center;
    color: #5a6b5a;
    padding: 25px;
    font-style: italic;
    font-family: 'Georgia', serif;
}

.message {
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    font-family: 'Segoe UI', sans-serif;
}

.message-button {
    padding: 10px 20px;
    background: white;
    color: #2d5a2d;
    border: 2px solid #6b8e6b;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s;
    margin-top: 8px;
    font-family: 'Segoe UI', sans-serif;
}

.message-button:hover {
    background: #6b8e6b;
    color: white;
    transform: translateY(-2px);
}

.error .message-button {
    color: #8b4513;
    border-color: #c9a789;
}

.error .message-button:hover {
    background: #c9a789;
    color: white;
}

.success {
    background: linear-gradient(135deg, #e8f5e9 0%, #d4edda 100%);
    color: #2d5a2d;
    border: 2px solid #a5d6a7;
}

.error {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe8d6 100%);
    color: #8b4513;
    border: 2px solid #ffccbc;
}

/* Calendar Styles */
.calendar-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 100%;
}

.calendar-month {
    background: linear-gradient(135deg, #fafcfa 0%, #f5f9f5 100%);
    border: 2px solid #e8f0e8;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(107, 142, 107, 0.1);
}

.calendar-month-title {
    text-align: center;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 1.6em;
    color: #2d5a2d;
    margin-bottom: 20px;
    font-weight: 400;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day-name {
    text-align: center;
    font-weight: 600;
    color: #5a6b5a;
    padding: 10px 5px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Segoe UI', sans-serif;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #e8f0e8;
    background: white;
    position: relative;
    cursor: default;
    transition: all 0.3s;
    min-height: 50px;
}

.calendar-day.empty {
    border: none;
    background: transparent;
}

.calendar-day.disabled {
    opacity: 0.3;
    background: #f5f5f5;
}

.calendar-day.has-prediction {
    cursor: pointer;
    font-weight: 600;
}

.calendar-day.has-prediction:hover {
    transform: scale(1.1);
    z-index: 10;
}

.day-number {
    font-size: 1.1em;
    color: #2d3e2d;
    font-weight: 500;
}

.calendar-day.disabled .day-number {
    color: #999;
}

.prediction-count {
    position: absolute;
    bottom: 2px;
    font-size: 0.75em;
    color: #2d5a2d;
    font-weight: 700;
    background: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid currentColor;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    form {
        flex-direction: column;
    }

    input[type="text"],
    input[type="date"] {
        min-width: 100%;
    }

    .name-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .calendar-grid {
        gap: 4px;
    }

    .calendar-day {
        min-height: 40px;
        font-size: 0.9em;
    }

    .calendar-month {
        padding: 15px;
    }
}
