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

html {
    background: transparent;
    min-height: auto;
}

body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: transparent;
    min-height: auto;
}

.widget-container {
    max-width: 660px;
    width: 100%;
    background: transparent;
    position: relative;
    border-radius: 20px;
    overflow: visible;
    margin: 0 auto;
    display: inline-block;
}

.rotator-wrapper {
    display: flex;
    flex-direction: column;
    position: relative;
}

.rotator-display {
    width: 100%;
    aspect-ratio: 2/1;
    max-height: 250px;
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    border: 1px solid #FF6913;
    border-bottom: none;
}

#current-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.1s ease-in-out;
    filter: brightness(1.1) contrast(1.1);
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(0, 255, 150, 0.1) 0%,
        rgba(0, 150, 255, 0.1) 50%,
        rgba(255, 0, 150, 0.1) 100%
    );
    pointer-events: none;
    opacity: 0.6;
}

.widget-content {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 100%);
    backdrop-filter: blur(10px);
    border-radius: 0 0 20px 20px;
    border: 1px solid #FF6913;
    border-top: none;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-text {
    background: linear-gradient(135deg, rgba(255, 105, 19, 0.1) 0%, rgba(255, 105, 19, 0.05) 100%);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    border: 1px solid rgba(255, 105, 19, 0.3);
    box-shadow: 0 4px 16px rgba(255, 105, 19, 0.2);
    transition: all 0.3s ease;
}

.match-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
    font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
    line-height: 1.3;
    text-align: center;
}

.match-description {
    display: none;
}

.controls {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.spin-btn, .winline-btn {
    position: relative;
    width: 140px;
    height: 28px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 0;
    overflow: hidden;
    transition: all 0.2s ease;
    background: #FF6913;
    color: white;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-family: "Century Gothic", CenturyGothic, AppleGothic, sans-serif;
}

.spin-btn:hover, .winline-btn:hover {
    background: #ff5800;
}

.spin-btn:active, .winline-btn:active {
    background: #ff5800;
}

.winline-btn {
    width: 180px;
}

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

.winline-btn:hover {
    box-shadow: 
        0 12px 24px rgba(0, 64, 252, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.winline-btn:active {
    box-shadow: 
        0 4px 8px rgba(0, 64, 252, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.btn-text {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.spin-btn:hover .btn-glow, .winline-btn:hover .btn-glow {
    transform: translateX(100%);
}

.widget-footer {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1e1e32, #2a2a3e);
    border-radius: 0 0 15px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.status-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
}

.hidden {
    display: none;
}

/* Анимация вращения */
.spinning {
    animation: fastSpin 0.1s linear infinite;
}

.slowing {
    animation: slowSpin 2s ease-out forwards;
}

@keyframes fastSpin {
    0% { transform: scale(1); filter: brightness(1); opacity: 1; }
    50% { transform: scale(1.01); filter: brightness(1.1); opacity: 0.9; }
    100% { transform: scale(1); filter: brightness(1); opacity: 1; }
}

@keyframes slowSpin {
    0% { transform: scale(1.01); filter: brightness(1.1); opacity: 0.9; }
    100% { transform: scale(1); filter: brightness(1.2); opacity: 1; }
}

/* Анимация появления кнопки Winline */
.fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(20px) scale(0.9); 
        display: flex;
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
        display: flex;
    }
}

/* Пульсация для активных элементов */
.pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 
            0 8px 16px rgba(255, 107, 107, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 12px 24px rgba(255, 107, 107, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
}

/* Отключенное состояние кнопки */
.spin-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.spin-btn:disabled:hover {
    transform: none !important;
    box-shadow: 
        0 8px 16px rgba(255, 107, 107, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Адаптивность */
@media (max-width: 750px) {
    .widget-container {
        width: calc(100% - 20px);
        max-width: 660px;
        margin: 0 10px;
    }
    
    .widget-content {
        padding: 15px;
        gap: 12px;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .spin-btn {
        width: 140px;
        height: 32px;
        font-size: 11px;
    }
    
    .winline-btn {
        width: 200px;
        height: 32px;
        font-size: 10px;
    }
    
    .image-text {
        padding: 12px 16px;
    }
    
    .match-title {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .widget-container {
        width: calc(100% - 10px);
        margin: 0 5px;
    }
    
    .rotator-display {
        max-height: 180px;
    }
    
    .widget-content {
        padding: 12px;
        gap: 10px;
    }
    
    .controls {
        gap: 8px;
    }
    
    .spin-btn {
        width: 120px;
        height: 28px;
        font-size: 10px;
    }
    
    .winline-btn {
        width: 180px;
        height: 28px;
        font-size: 9px;
    }
    
    .image-text {
        padding: 10px 14px;
    }
    
    .match-title {
        font-size: 14px;
    }
}
