:root {
    --primary-color: #e63946;
    --secondary-color: #f1faee;
    --accent-color: #a8dadc;
    --dark-color: #1d3557;
    --success-color: #2a9d8f;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--secondary-color);
    color: var(--dark-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    background: white;
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.description {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 0.9rem;
}

/* Form Styles */
.input-group {
    margin-bottom: 1rem;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input[type="text"], 
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input[type="text"]:focus, 
textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    transition: transform 0.1s, opacity 0.2s;
}

button:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    width: 100%;
    font-size: 1.1rem;
    margin-top: 10px;
}

.btn-secondary {
    background-color: var(--dark-color);
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-add {
    background-color: var(--success-color);
    color: white;
    padding: 10px;
    width: 100%;
    margin-top: 5px;
}

/* Participant List */
#participants-list {
    list-style: none;
    margin-bottom: 1rem;
    text-align: left;
}

.participant-item {
    background: #f8f9fa;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.remove-btn {
    color: var(--primary-color);
    background: none;
    font-size: 1.2rem;
    padding: 0 5px;
}

/* Sections visibility */
.hidden {
    display: none !important;
}

/* Link Result Section */
.link-box {
    background: #f0f0f0;
    padding: 15px;
    word-break: break-all;
    border-radius: 8px;
    margin: 15px 0;
    font-family: monospace;
    font-size: 0.9rem;
    border: 1px dashed #999;
}

.copy-hint {
    font-size: 0.8rem;
    color: var(--success-color);
    margin-top: 5px;
    min-height: 20px;
}

/* Game Grid */
.names-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.name-card {
    background-color: var(--dark-color);
    color: white;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.name-card:hover {
    background-color: var(--primary-color);
}

.name-card.disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Modal / Result Reveal */
.result-box {
    background: #fff3cd;
    border: 2px solid #ffeeba;
    color: #856404;
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gift-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.rules-display {
    background: #e9ecef;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-align: left;
}

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

@keyframes popIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
