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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #0d2818 100%);
    min-height: 100vh;
    overflow-x: hidden;
    color: #fff;
}

/* Animación de copos de nieve */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: #fff;
    font-size: 1.5em;
    opacity: 0.8;
    animation: fall linear infinite;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
}

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

.snowflake:nth-child(1) { left: 10%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 20%; animation-duration: 12s; animation-delay: 1s; font-size: 2em; }
.snowflake:nth-child(3) { left: 30%; animation-duration: 8s; animation-delay: 2s; }
.snowflake:nth-child(4) { left: 40%; animation-duration: 14s; animation-delay: 0.5s; font-size: 1.2em; }
.snowflake:nth-child(5) { left: 50%; animation-duration: 11s; animation-delay: 1.5s; }
.snowflake:nth-child(6) { left: 60%; animation-duration: 9s; animation-delay: 2.5s; font-size: 1.8em; }
.snowflake:nth-child(7) { left: 70%; animation-duration: 13s; animation-delay: 0.8s; }
.snowflake:nth-child(8) { left: 80%; animation-duration: 10s; animation-delay: 1.8s; font-size: 1.4em; }
.snowflake:nth-child(9) { left: 90%; animation-duration: 12s; animation-delay: 0.3s; }
.snowflake:nth-child(10) { left: 15%; animation-duration: 11s; animation-delay: 2.2s; font-size: 1.6em; }
.snowflake:nth-child(11) { left: 55%; animation-duration: 9s; animation-delay: 1.2s; }
.snowflake:nth-child(12) { left: 75%; animation-duration: 13s; animation-delay: 2.8s; font-size: 2.2em; }

/* Container principal */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out;
}

header h1 {
    font-size: 3.5em;
    color: #ffd700;
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.8),
        0 0 20px rgba(255, 215, 0, 0.6),
        0 0 30px rgba(255, 215, 0, 0.4),
        2px 2px 4px rgba(0, 0, 0, 0.5); }
    to { text-shadow: 
        0 0 20px rgba(255, 215, 0, 1),
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 40px rgba(255, 215, 0, 0.6),
        2px 2px 4px rgba(0, 0, 0, 0.5); }
}

.subtitle {
    font-size: 1.2em;
    color: #b8e6c9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

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

/* Card */
.card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 215, 0, 0.3);
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.card h2 {
    color: #ffd700;
    text-align: center;
    margin-bottom: 25px;
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Input Section */
textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    font-family: inherit;
    resize: vertical;
    color: #333;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.shuffle-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    justify-content: center;
}

.shuffle-controls label {
    font-size: 1.1em;
    color: #b8e6c9;
    font-weight: bold;
}

.shuffle-controls input[type="number"] {
    width: 80px;
    padding: 10px;
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 1.1em;
    text-align: center;
    color: #333;
}

/* Buttons */
.btn {
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.2em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin: 20px auto;
}

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

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

.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    color: #1a472a;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #34ce57 0%, #4ade80 100%);
}

.btn-warning {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff8c42 0%, #ffa94d 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
    color: white;
}

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

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

.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.button-group .btn {
    margin: 0;
    flex: 1;
    min-width: 180px;
}

/* Names List */
.names-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

.name-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    font-size: 1.3em;
    transition: all 0.5s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideIn 0.5s ease-out;
}

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

.name-item .number {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    color: #1a472a;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

.name-item .name {
    flex: 1;
    color: #fff;
    font-weight: 500;
}

.name-item.highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.4) 0%, rgba(255, 215, 0, 0.6) 100%);
    border-color: #ffd700;
    transform: scale(1.05);
    box-shadow: 
        0 0 30px rgba(255, 215, 0, 0.8),
        0 0 60px rgba(255, 215, 0, 0.4);
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 0 30px rgba(255, 215, 0, 0.8),
            0 0 60px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 
            0 0 40px rgba(255, 215, 0, 1),
            0 0 80px rgba(255, 215, 0, 0.6);
    }
}

.name-item.selected {
    background: rgba(40, 167, 69, 0.3);
    border-color: #34ce57;
    opacity: 0.7;
}

/* FABs Flotantes */
.fab-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1001;
    animation: fadeInUp 0.5s ease-out;
}

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

.fab {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.4),
        0 0 0 0 rgba(255, 215, 0, 0.5);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.fab:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.8);
}

.fab:active {
    transform: scale(1.05);
}

.fab-primary {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    color: white;
    animation-delay: 0s;
}

.fab-primary:hover {
    background: linear-gradient(135deg, #34ce57 0%, #4ade80 100%);
}

.fab-warning {
    background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 100%);
    color: white;
    animation-delay: 0.1s;
}

.fab-warning:hover {
    background: linear-gradient(135deg, #ff8c42 0%, #ffa94d 100%);
}

.fab-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
    color: white;
    animation-delay: 0.2s;
}

.fab-secondary:hover {
    background: linear-gradient(135deg, #868e96 0%, #adb5bd 100%);
}

.fab-info {
    background: linear-gradient(135deg, #17a2b8 0%, #20c9e0 100%);
    color: white;
    animation-delay: 0s;
}

.fab-info:hover {
    background: linear-gradient(135deg, #20c9e0 0%, #4dd4e8 100%);
}

.fab-info.copied {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    animation: copySuccess 0.5s ease;
}

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

.fab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.fab:disabled:hover {
    transform: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5em;
    }
    
    .card {
        padding: 25px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .button-group .btn {
        min-width: auto;
    }
    
    .shuffle-controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .fab-container {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .fab {
        width: 55px;
        height: 55px;
        font-size: 1.5em;
    }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 150px;
    right: 30px;
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1002;
    font-weight: bold;
    animation: toastIn 0.3s ease-out;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .toast {
        bottom: 120px;
        right: 20px;
        font-size: 0.9em;
        padding: 12px 20px;
    }
}
