/* Tirage au Sort - Plugin WordPress */

/* Force all text colors inside container */
.tas-container,
.tas-container * {
    -webkit-text-fill-color: inherit;
}

.tas-container p,
.tas-container span,
.tas-container label,
.tas-container div {
    color: inherit;
}

.tas-container {
    --tas-gold: #FFD700;
    --tas-gold-dark: #B8860B;
    --tas-deep-blue: #0a0a1a;
    --tas-accent: #00ffaa;
    --tas-white: #ffffff;
    
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--tas-deep-blue);
    min-height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 3rem 2rem;
}

/* Animated background */
.tas-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 255, 170, 0.08) 0%, transparent 50%),
        var(--tas-deep-blue);
}

.tas-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.tas-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--tas-gold);
    border-radius: 50%;
    opacity: 0;
}

.tas-confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.tas-confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
}

/* Content */
.tas-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Title */
.tas-title {
    font-size: clamp(2rem, 6vw, 3.5rem) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    text-align: center !important;
    margin: 0 0 0.5rem 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    text-shadow: 
        0 0 20px rgba(255, 215, 0, 0.5),
        0 0 40px rgba(255, 215, 0, 0.3) !important;
    animation: tasTitleGlow 3s ease-in-out infinite !important;
    background: transparent !important;
}

@keyframes tasTitleGlow {
    0%, 100% { text-shadow: 0 0 20px rgba(255, 215, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3); }
    50% { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 60px rgba(255, 215, 0, 0.5); }
}

.tas-subtitle {
    color: #00ffaa !important;
    font-size: 1rem !important;
    margin: 0 0 2.5rem 0 !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    background: transparent !important;
}

/* Upload zone */
.tas-upload-zone {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 215, 0, 0.4);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin-bottom: 1.5rem;
    display: block;
}

.tas-upload-zone:hover {
    border-color: var(--tas-gold);
    background: rgba(255, 215, 0, 0.05);
    transform: scale(1.02);
}

.tas-upload-zone.dragover {
    border-color: var(--tas-accent);
    background: rgba(0, 255, 170, 0.1);
    transform: scale(1.05);
}

.tas-upload-icon {
    font-size: 3rem;
    margin-bottom: 0.8rem;
}

.tas-upload-text {
    color: #ffffff !important;
    font-size: 1.1rem !important;
    margin: 0 0 0.3rem 0 !important;
    background: transparent !important;
    -webkit-text-fill-color: #ffffff !important;
}

.tas-upload-hint {
    color: #aaaaaa !important;
    font-size: 0.85rem !important;
    margin: 0 !important;
    background: transparent !important;
    -webkit-text-fill-color: #aaaaaa !important;
}

.tas-upload-zone p {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.tas-upload-zone .tas-upload-hint {
    color: #aaaaaa !important;
    -webkit-text-fill-color: #aaaaaa !important;
}

.tas-upload-zone input[type="file"] {
    display: none;
}

/* File info */
.tas-file-info {
    display: none;
    background: rgba(0, 255, 170, 0.1) !important;
    border: 1px solid #00ffaa !important;
    border-radius: 12px !important;
    padding: 0.8rem 1.5rem !important;
    margin-bottom: 1.5rem !important;
    color: #00ffaa !important;
}

.tas-file-info.visible {
    display: flex !important;
    align-items: center !important;
    gap: 0.8rem !important;
}

.tas-file-info span {
    color: #00ffaa !important;
    background: transparent !important;
}

/* Winners config */
.tas-winners-config {
    display: none;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tas-winners-config.visible {
    display: flex;
}

.tas-winners-config label {
    color: #ffffff !important;
    font-size: 1rem !important;
    background: transparent !important;
}

.tas-winners-input {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid #FFD700 !important;
    border-radius: 10px !important;
    padding: 0.6rem 1rem !important;
    color: #FFD700 !important;
    font-family: inherit !important;
    font-size: 1.3rem !important;
    width: 70px !important;
    text-align: center !important;
}

.tas-winners-input:focus {
    outline: none;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

/* Draw button */
.tas-draw-button {
    display: none;
    background: linear-gradient(135deg, #FFD700 0%, #B8860B 100%) !important;
    border: none !important;
    border-radius: 60px !important;
    padding: 1.2rem 3rem !important;
    font-family: inherit !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #0a0a1a !important;
    cursor: pointer !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    transition: all 0.3s ease !important;
    box-shadow: 
        0 10px 40px rgba(255, 215, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.3) !important;
}

.tas-draw-button.visible {
    display: block;
}

.tas-draw-button:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 50px rgba(255, 215, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.3);
}

.tas-draw-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Slot machine */
.tas-slot-machine {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.tas-slot-machine.visible {
    display: flex;
}

.tas-slot-container {
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
    border: 4px solid var(--tas-gold);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 
        0 0 60px rgba(255, 215, 0, 0.2),
        inset 0 0 60px rgba(0, 0, 0, 0.5);
}

.tas-slot-window {
    background: #000;
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    overflow: hidden;
    position: relative;
}

.tas-slot-window::before,
.tas-slot-window::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 30px;
    z-index: 10;
    pointer-events: none;
}

.tas-slot-window::before {
    top: 0;
    background: linear-gradient(to bottom, #000 0%, transparent 100%);
}

.tas-slot-window::after {
    bottom: 0;
    background: linear-gradient(to top, #000 0%, transparent 100%);
}

.tas-slot-reel {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tas-slot-name {
    font-size: clamp(1.3rem, 4vw, 2rem) !important;
    font-weight: 700 !important;
    color: #FFD700 !important;
    text-align: center !important;
    white-space: nowrap !important;
    background: transparent !important;
}

.tas-slot-name.spinning {
    animation: tasSlotSpin 0.08s linear infinite;
}

@keyframes tasSlotSpin {
    0% { transform: translateY(-100%); opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

.tas-slot-name.winner {
    animation: tasWinnerReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    color: #00ffaa !important;
    text-shadow: 0 0 30px #00ffaa !important;
}

@keyframes tasWinnerReveal {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Winners list */
.tas-winners-list {
    display: none;
    flex-direction: column;
    gap: 0.8rem;
    margin-top: 1.5rem;
    width: 100%;
    max-width: 500px;
}

.tas-winners-list.visible {
    display: flex;
}

.tas-winner-item {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    background: rgba(255, 215, 0, 0.1) !important;
    border: 2px solid #FFD700 !important;
    border-radius: 15px !important;
    padding: 0.8rem 1.5rem !important;
    animation: tasWinnerSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards !important;
    opacity: 0;
    transform: translateX(-50px);
}

@keyframes tasWinnerSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.tas-winner-rank {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: #FFD700 !important;
    min-width: 50px !important;
    text-align: center !important;
    background: transparent !important;
}

.tas-winner-rank::before {
    content: '#';
    font-size: 0.9rem !important;
    opacity: 0.6 !important;
}

.tas-winner-name {
    font-size: 1.1rem !important;
    color: #ffffff !important;
    flex: 1 !important;
    background: transparent !important;
}

.tas-winner-badge {
    font-size: 1.3rem !important;
    background: transparent !important;
}

/* Reset button */
.tas-reset-button {
    display: none;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 30px !important;
    padding: 0.8rem 1.5rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-family: inherit !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    margin-top: 2rem !important;
    transition: all 0.3s ease !important;
}

.tas-reset-button.visible {
    display: block !important;
}

.tas-reset-button:hover {
    border-color: #ffffff !important;
    color: #ffffff !important;
}

/* Sound toggle */
.tas-sound-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    z-index: 50;
}

.tas-sound-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 600px) {
    .tas-container {
        padding: 2rem 1rem;
    }
    
    .tas-upload-zone {
        padding: 2rem;
    }
    
    .tas-winners-config {
        flex-direction: column;
        gap: 0.5rem;
    }
}
