/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #FFF8E7 0%, #FFE8B6 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: #fffefd;
}

header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

section {
    background: #FFFBF0;
    padding: 1.5rem;
}

section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 3px solid #ecf0f1;
    padding-bottom: 0.5rem;
}

section h3 {
    color: #34495e;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Form Styles */
.egg-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

input[type="date"],
input[type="number"],
textarea {
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="date"]:focus,
input[type="number"]:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Color Grid */
.color-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.color-option {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.color-option:hover {
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.color-name {
    font-size: 0.95rem;
    text-align: center;
}

.quantity-boxes {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.quantity-boxes input[type="radio"] {
    display: none;
}

.quantity-boxes label {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.3);
}

.quantity-boxes label:hover {
    transform: scale(1.1);
    border-color: rgba(0, 0, 0, 0.4);
}

.quantity-boxes input[type="radio"]:checked + label {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    transform: scale(1.15);
}

.issue-icons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.issue-icons input[type="checkbox"] {
    display: none;
}

.issue-icons label {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.3);
}

.issue-icons label:hover {
    transform: scale(1.15);
    border-color: rgba(0, 0, 0, 0.4);
}

.issue-icons input[type="checkbox"]:checked + label {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    transform: scale(1.2);
}

.issue-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.7);
    text-align: center;
    margin-bottom: 0.5rem;
}

.color-option.dark-brown .issue-label {
    color: rgba(255, 255, 255, 0.85);
}

.egg-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.egg-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.egg-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.egg-number:hover {
    transform: scale(1.1);
    border-color: rgba(0, 0, 0, 0.4);
}

.egg-number.selected {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
    transform: scale(1.15);
}

.color-option.dark-brown .egg-number {
    border-color: rgba(255, 255, 255, 0.3);
}

.color-option.dark-brown .egg-number:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.color-option.dark-brown .egg-number.selected {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}

.egg-issues-row {
    display: flex;
    gap: 0.4rem;
}

.egg-issue-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-size: 0.6rem;
    font-weight: 600;
    transition: all 0.15s;
}

.egg-issue-toggle:hover {
    border-color: rgba(0, 0, 0, 0.4);
}

.egg-issue-toggle.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.6);
}

.color-option.dark-brown .egg-issue-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.1);
}

.color-option.dark-brown .egg-issue-toggle:hover {
    border-color: rgba(255, 255, 255, 0.4);
}

.color-option.dark-brown .egg-issue-toggle.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}

.color-option.light-brown {
    background: #D2B48C;
    color: #333;
}

.color-option.dark-brown {
    background: #8B6F47;
    color: white;
}

.color-option.dark-brown .quantity-boxes label {
    border-color: rgba(255, 255, 255, 0.3);
}

.color-option.dark-brown .quantity-boxes label:hover {
    border-color: rgba(255, 255, 255, 0.6);
}

.color-option.dark-brown .quantity-boxes input[type="radio"]:checked + label {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.8);
}

.color-option.green {
    background: #9CCC65;
    color: #333;
}

.color-option.blue {
    background: #64B5F6;
    color: #333;
}

/* Buttons */
.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #D2691E 0%, #CD5C5C 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(210, 105, 30, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Responsive Design */

/* Tablet (768px and up) */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    section {
        padding: 1.25rem;
    }
}

/* Mobile (480px and up) */
@media (max-width: 480px) {
    .container {
        padding: 0.75rem;
    }

    header {
        padding: 1.5rem 1rem;
        margin-bottom: 1.5rem;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    main {
        gap: 1.5rem;
    }

    section {
        padding: 1rem;
        border-radius: 10px;
    }

    section h2 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    section h3 {
        font-size: 1.05rem;
        margin-top: 1rem;
    }

    .egg-form {
        gap: 1.25rem;
    }

    .color-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .color-option {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .quantity-boxes label {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .issue-icons label {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .egg-number {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .egg-issue-toggle {
        width: 18px;
        height: 18px;
        font-size: 0.55rem;
    }

    .btn-primary {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Small Mobile (under 360px) */
@media (max-width: 360px) {
    header h1 {
        font-size: 1.5rem;
    }

    .color-grid {
        grid-template-columns: 1fr;
    }
}
