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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

header h1 {
    font-size: 2rem;
    color: #2c3e50;
}

.counter-container {
    background-color: #34495e;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
}

/* Rules Section */
.rules-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.rules-section h2 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

.rules-section ol {
    padding-left: 20px;
}

.rules-section li {
    margin-bottom: 10px;
}

/* Main Layout */
main {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.form-section, .responses-section {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

/* Form Styles */
.form-section h2, .responses-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

input:focus, select:focus, textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

small {
    display: block;
    color: #7f8c8d;
    margin-top: 5px;
    font-size: 0.8rem;
}

.submit-btn {
    background-color: #2ecc71;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #27ae60;
}

/* Responses Section */
.status-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.confirmed {
    background-color: #2ecc71;
}

.status-dot.waiting {
    background-color: #f1c40f;
}

.responses-list {
    max-height: 500px;
    overflow-y: auto;
}

.response-card {
    background-color: #f9f9f9;
    border-left: 4px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.response-card.confirmed {
    border-left-color: #2ecc71;
}

.response-card.waiting {
    border-left-color: #f1c40f;
}

.response-card h3 {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.response-card p {
    margin-bottom: 5px;
    word-break: break-word;
}

.response-number {
    background-color: #34495e;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.no-responses {
    color: #7f8c8d;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Footer Styles */
footer {
    margin-top: 40px;
    text-align: center;
    color: #7f8c8d;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    main {
        flex-direction: column;
    }
    
    .form-section, .responses-section {
        width: 100%;
    }
    
    .counter-container {
        align-self: flex-start;
    }
}

/* Form Validation Styles */
input:invalid, select:invalid {
    border-color: #e74c3c;
}

input:invalid:focus, select:invalid:focus {
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

/* Animation for new responses */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.response-card {
    animation: fadeIn 0.5s ease-out;
}
