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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Snowflake animation background effect */
body::before {
    content: '❄';
    position: fixed;
    top: -10%;
    left: 10%;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    animation: fall 10s linear infinite;
    z-index: 0;
}

body::after {
    content: '❅';
    position: fixed;
    top: -10%;
    right: 20%;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.25);
    animation: fall 12s linear infinite 2s;
    z-index: 0;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

h1 {
    color: #1e3a8a;
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.8em;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    color: #1e40af;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: 700;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 12px;
    display: inline-block;
    width: 100%;
}

.section {
    margin-bottom: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    border-radius: 15px;
    border: 1px solid #bfdbfe;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

input[type="text"],
input[type="password"],
select {
    flex: 1;
    min-width: 200px;
    padding: 14px 18px;
    border: 2px solid #cbd5e1;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    padding: 15px 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    border-left: 4px solid #ef4444;
    margin-top: 15px;
    animation: slideIn 0.5s ease;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.btn-success {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.btn-large {
    width: 100%;
    font-size: 20px;
    padding: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-height: 100px;
    border: 2px solid #e0f2fe;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #3b82f6;
    transition: all 0.3s ease;
}

.list-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

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

.list-item-name {
    font-weight: 700;
    color: #1e293b;
    font-size: 1.1em;
}

.list-item-delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.list-item-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    color: #94a3b8;
    padding: 30px;
    font-style: italic;
    font-size: 16px;
}

.help-text {
    color: #475569;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.result {
    margin-top: 20px;
    padding: 18px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result.success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.result.error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    border-left: 4px solid #ef4444;
}

.links-container {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0f2fe;
}

.link-item {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #3b82f6;
}

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

.link-item-name {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 12px;
    font-size: 1.15em;
}

.link-item-url {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.link-item-url input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    background: white;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #334155;
}

.link-item-url button {
    padding: 12px 24px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.link-item-url button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

/* Participant Page Styles */
.participant-container {
    text-align: center;
    padding: 60px 30px;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.participant-container h1 {
    margin-bottom: 50px;
    font-size: 3.2em;
}

.wichtel-card {
    background: linear-gradient(135deg, #ec4899 0%, #f43f5e 50%, #ef4444 100%);
    color: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.4);
    margin: 30px 0;
    animation: cardAppear 0.8s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.9) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateX(0deg);
    }
}

.wichtel-card h2 {
    color: white;
    border: none;
    margin-bottom: 25px;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.wichtel-name {
    font-size: 3.5em;
    font-weight: 900;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4);
    margin: 20px 0;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.loading {
    text-align: center;
    padding: 60px;
    color: #475569;
    font-size: 20px;
    font-weight: 500;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #7f1d1d;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    border-left: 4px solid #ef4444;
}

@media (max-width: 768px) {
    .container {
        padding: 25px;
        border-radius: 15px;
    }

    h1 {
        font-size: 2.2em;
    }

    h2 {
        font-size: 1.4em;
    }

    .form-group {
        flex-direction: column;
    }

    input[type="text"],
    select {
        width: 100%;
    }

    .wichtel-name {
        font-size: 2.5em;
    }

    .participant-container h1 {
        font-size: 2.5em;
    }

    .link-item-url {
        flex-direction: column;
    }

    .link-item-url input {
        width: 100%;
    }

    .link-item-url button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .wichtel-card {
        padding: 30px 20px;
    }

    .wichtel-name {
        font-size: 2em;
    }
}
