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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 700px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

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

header {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.checkbox-label:hover {
    border-color: #667eea;
    background-color: #f5f7ff;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.ranking-group {
    margin-top: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 14px;
    margin-bottom: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    background: white;
    cursor: move;
    transition: all 0.3s ease;
    user-select: none;
}

.ranking-item:hover {
    border-color: #667eea;
    background-color: #f5f7ff;
    transform: translateX(4px);
}

.ranking-item.dragging {
    opacity: 0.5;
    border-color: #667eea;
    background-color: #e8ecff;
}

.ranking-item.drag-over {
    border-color: #667eea;
    background-color: #e8ecff;
    transform: translateY(2px);
}

.drag-handle {
    font-size: 1.2rem;
    color: #999;
    margin-right: 12px;
    cursor: grab;
}

.drag-handle:active {
    cursor: grabbing;
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 12px;
    flex-shrink: 0;
}

.amenity-name {
    flex: 1;
    font-weight: 500;
    color: #444;
}

.ranking-help {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.success-message,
.error-message {
    text-align: center;
    padding: 30px;
    border-radius: 6px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease-in;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 25px;
        margin: 10px;
    }

    h1 {
        font-size: 1.6rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }

    body {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.4rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="number"],
    select,
    textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
