/**
 * استایل قرعه‌کشی - طراحی کودکانه و جذاب
 */

.anamis-lottery-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 25px 35px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.anamis-lottery-container,
.anamis-lottery-container *,
.anamis-lottery-container h1,
.anamis-lottery-container h2,
.anamis-lottery-container h3,
.anamis-lottery-container h4,
.anamis-lottery-container h5,
.anamis-lottery-container h6,
.anamis-lottery-container p,
.anamis-lottery-container span,
.anamis-lottery-container div,
.anamis-lottery-container button,
.anamis-lottery-container a,
.anamis-lottery-container label,
.anamis-lottery-container input,
.anamis-lottery-container code {
    font-family: inherit !important;
}

.anamis-lottery-container::before {
    content: '🎈🎈🎈';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 40px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite;
}

.anamis-lottery-container::after {
    content: '🎉🎊🎁';
    position: absolute;
    bottom: -20px;
    right: 20px;
    font-size: 40px;
    opacity: 0.3;
    animation: float 3s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* هدر */
.anamis-lottery-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.anamis-lottery-title {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 8px 0;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

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

.anamis-lottery-subtitle {
    font-size: 16px;
    color: #f0f0f0;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* چینش عمودی */
.anamis-lottery-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
    z-index: 1;
}

/* باکس‌ها - بالا و مرکز */
.anamis-lucky-box-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* جوایز - پایین و سطری */
.anamis-lottery-prizes-section {
    width: 100%;
    text-align: center;
    margin: 10px 0 0 0;
}

.anamis-prizes-title {
    font-size: 16px;
    color: #fff;
    margin: 0 0 12px 0;
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.anamis-prizes-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.anamis-prize-item {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 10px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
}

.anamis-prize-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
}

.anamis-prize-icon {
    font-size: 28px;
}

.anamis-prize-name {
    font-size: 13px;
    font-weight: bold;
    color: #667eea;
    white-space: nowrap;
}

/* پیام لاگین */
.anamis-lottery-login-required {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.anamis-login-message {
    font-size: 18px;
    color: #333;
    margin: 0 0 20px 0;
}

.anamis-login-button {
    display: inline-block;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.anamis-login-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* گردونه */
.anamis-lottery-wheel-container {
    text-align: center;
    position: relative;
    z-index: 1;
}

.anamis-lottery-wheel {
    width: 350px;
    height: 350px;
    margin: 0 auto 30px;
    position: relative;
}

.anamis-wheel-center {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.anamis-wheel-pointer {
    font-size: 60px;
    color: #fff;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
    animation: pointerBounce 1s ease-in-out infinite;
}

@keyframes pointerBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.anamis-wheel-sections {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border: 8px solid #fff;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
    overflow: hidden;
}

.anamis-wheel-sections.spinning {
    animation: spin 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(1800deg);
    }
}

.anamis-wheel-section {
    position: absolute;
    width: 50%;
    height: 50%;
    transform-origin: 100% 100%;
    overflow: hidden;
}

.anamis-wheel-section::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    border-radius: 50%;
    transform-origin: 0 0;
}

.anamis-wheel-section span {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-60deg);
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    text-align: center;
    line-height: 1.4;
    white-space: nowrap;
}

.anamis-wheel-section.section-1 {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 0;
    left: 50%;
    transform: rotate(0deg) skewY(-60deg);
}

.anamis-wheel-section.section-2 {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    top: 0;
    left: 50%;
    transform: rotate(120deg) skewY(-60deg);
}

.anamis-wheel-section.section-3 {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    top: 0;
    left: 50%;
    transform: rotate(240deg) skewY(-60deg);
}

/* دکمه چرخش */
.anamis-spin-button {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    border: none;
    padding: 20px 50px;
    font-size: 22px;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.anamis-spin-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.anamis-spin-button:hover::before {
    width: 300px;
    height: 300px;
}

.anamis-spin-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.anamis-spin-button:active {
    transform: translateY(-2px) scale(1.02);
}

.anamis-spin-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.anamis-button-text {
    position: relative;
    z-index: 1;
}

/* پیام‌ها */
.anamis-lottery-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    text-align: center;
    display: none;
}

.anamis-lottery-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.anamis-lottery-message.error {
    background: rgba(255, 77, 77, 0.9);
    color: #fff;
}

.anamis-lottery-message.success {
    background: rgba(77, 255, 136, 0.9);
    color: #fff;
}

/* نتیجه */
.anamis-lottery-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.anamis-result-success {
    text-align: center;
}

.anamis-result-success h3 {
    font-size: 28px;
    color: #667eea;
    margin: 0 0 20px 0;
    animation: celebrate 1s ease-in-out infinite;
}

@keyframes celebrate {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

.anamis-won-prize {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 15px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.anamis-won-prize-icon {
    font-size: 80px;
    margin-bottom: 15px;
    animation: rotate 2s linear infinite;
}

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

.anamis-won-prize-name {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
}

.anamis-won-prize-desc {
    font-size: 18px;
    color: #fff;
    margin: 0;
}

.anamis-prize-code {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    padding: 15px;
    margin-top: 20px;
}

.anamis-prize-code strong {
    display: block;
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.anamis-prize-code code {
    display: inline-block;
    background: #667eea;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 2px;
}

.anamis-auto-apply-note {
    font-size: 16px;
    color: #333;
    margin: 20px 0 0 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
}

.anamis-auto-apply-info {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.anamis-auto-apply-icon {
    font-size: 40px;
    animation: sparkle 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes sparkle {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
}

.anamis-auto-apply-text {
    flex: 1;
    text-align: right;
}

.anamis-auto-apply-text strong {
    display: block;
    color: #fff;
    font-size: 18px;
    margin-bottom: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.anamis-auto-apply-text p {
    color: #f0f0f0;
    font-size: 14px;
    margin: 0;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* غیرفعال */
.anamis-lottery-disabled {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    color: #666;
    font-size: 18px;
}

/* ریسپانسیو */
@media (max-width: 1024px) {
    .anamis-lottery-content-wrapper {
        gap: 20px;
    }
    
    .anamis-lottery-prizes-section {
        flex: 0 0 240px;
    }
    
    .anamis-prize-icon {
        font-size: 35px;
    }
    
    .anamis-prize-name {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .anamis-lottery-container {
        padding: 20px 15px;
        margin: 20px auto;
    }
    
    .anamis-lottery-title {
        font-size: 22px;
    }
    
    .anamis-lottery-subtitle {
        font-size: 14px;
    }
    
    .anamis-lottery-content-wrapper {
        flex-direction: column;
        gap: 10px;
    }
    
    /* باکس‌ها بالا */
    .anamis-lucky-box-section {
        order: 1;
        width: 100%;
    }
    
    /* جوایز پایین */
    .anamis-lottery-prizes-section {
        order: 2;
        width: 100%;
        margin: 0;
        flex: initial; /* Fix for extra space on mobile */
    }
    
    .anamis-prizes-title {
        font-size: 15px;
        margin-bottom: 10px;
    }
    
    .anamis-prizes-list {
        flex-direction: row;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .anamis-prize-item {
        flex: 1;
        min-width: 100px;
        padding: 10px 12px;
    }
    
    .anamis-prize-icon {
        font-size: 24px;
    }
    
    .anamis-prize-name {
        font-size: 12px;
    }
    
    .anamis-auto-apply-info {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
    
    .anamis-auto-apply-text {
        text-align: center;
    }
    
    .anamis-auto-apply-text strong {
        font-size: 16px;
    }
    
    .anamis-auto-apply-text p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .anamis-lottery-container {
        padding: 15px 12px;
        margin: 15px auto;
    }
    
    .anamis-lottery-title {
        font-size: 18px;
    }
    
    .anamis-lottery-subtitle {
        font-size: 12px;
    }
    
    .anamis-lottery-content-wrapper {
        gap: 8px;
    }
    
    .anamis-lottery-header {
        margin-bottom: 15px;
    }
    
    /* باکس‌ها بالا */
    .anamis-lucky-box-section {
        order: 1;
    }
    
    /* جوایز پایین */
    .anamis-lottery-prizes-section {
        order: 2;
        margin: 0;
        flex: initial; /* Fix for extra space on mobile */
    }
    
    .anamis-prizes-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .anamis-prizes-list {
        flex-direction: row;
        gap: 6px;
        flex-wrap: wrap;
        margin-bottom: 0;
    }
    
    .anamis-prize-item {
        flex: 1;
        min-width: 90px;
        padding: 8px 10px;
        flex-direction: column;
        gap: 5px;
    }
    
    .anamis-prize-icon {
        font-size: 22px;
    }
    
    .anamis-prize-name {
        font-size: 11px;
    }
    
    .anamis-won-prize-icon {
        font-size: 60px;
    }
    
    .anamis-won-prize-name {
        font-size: 22px;
    }
}
