/* Secret Santa with Exclusions - Styles */

:root {
    --primary: #c41e3a;
    --primary-dark: #8b0000;
    --secondary: #228b22;
    --secondary-dark: #006400;
    --gold: #ffd700;
    --snow: #fffafa;
    --text: #333;
    --text-light: #666;
    --border: #ddd;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

/* Snowfall effect */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.snowflake {
    position: absolute;
    top: -10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    animation: fall linear infinite;
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    background: var(--snow);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: var(--text-light);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

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

.help-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 30, 58, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 139, 34, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

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

/* Participant list */
.participant-list {
    list-style: none;
}

.participant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
}

.participant-item.submitted {
    border-color: var(--success);
    background: rgba(40, 167, 69, 0.05);
}

.participant-item.pending {
    border-color: var(--warning);
    background: rgba(255, 193, 7, 0.05);
}

.participant-name {
    font-weight: 600;
}

.participant-status {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.status-submitted {
    background: var(--success);
    color: white;
}

.status-pending {
    background: var(--warning);
    color: var(--text);
}

/* Exclusion selection */
.exclusion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.exclusion-option {
    position: relative;
}

.exclusion-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.exclusion-option label {
    display: block;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: normal;
}

.exclusion-option input:checked + label {
    border-color: var(--danger);
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.exclusion-option label:hover {
    border-color: var(--primary);
}

.exclusion-count {
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.05);
}

.exclusion-count.warning {
    background: rgba(255, 193, 7, 0.2);
    color: #856404;
}

.exclusion-count.error {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger);
}

/* Links section */
.links-section {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.link-item:last-child {
    margin-bottom: 0;
}

.link-url {
    font-family: monospace;
    font-size: 0.875rem;
    color: var(--text-light);
    word-break: break-all;
    flex: 1;
    margin-right: 1rem;
}

.btn-copy {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Name reveal animation */
.reveal-container {
    text-align: center;
    padding: 3rem 2rem;
}

.name-slot {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 2rem 0;
}

.name-slot.spinning .name-text {
    animation: slot-spin 0.1s linear infinite;
}

@keyframes slot-spin {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.reveal-message {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.revealed-name {
    font-size: 4rem;
    font-weight: 700;
    color: var(--secondary);
    animation: pop-in 0.5s ease-out;
}

@keyframes pop-in {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Status messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success);
    color: #155724;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid var(--warning);
    color: #856404;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid var(--danger);
    color: #721c24;
}

.alert-info {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid #007bff;
    color: #004085;
}

/* Progress indicator */
.progress-bar {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary), var(--primary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-header h1 {
        font-size: 1.75rem;
    }

    .exclusion-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .revealed-name {
        font-size: 2.5rem;
    }
}

/* Utility classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
