/* Global Loader */
#globalLoader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    /* Hidden by default */
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#globalLoader.active {
    display: flex;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color, #4361ee);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

.loader-text {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

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

/* Welcome Modal */
#welcomeModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#welcomeModal.active {
    display: flex;
    opacity: 1;
}

.welcome-content {
    background: var(--bg-card, #ffffff);
    width: 90%;
    max-width: 600px;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid var(--border-color, #eee);
    overflow: hidden;
}

#welcomeModal.active .welcome-content {
    transform: scale(1);
}

.welcome-header {
    background: linear-gradient(135deg, var(--primary-color, #4361ee), #3a0ca3);
    padding: 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.welcome-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    animation: rotate 20s linear infinite;
}

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

    to {
        transform: rotate(360deg);
    }
}

.welcome-icon {
    font-size: 3rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    animation: bounce 1s infinite;
}

.welcome-header h2 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.welcome-header p {
    margin: 5px 0 0;
    opacity: 0.9;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
}

.welcome-body {
    padding: 25px;
    text-align: left;
}

.scrollable-body {
    overflow-y: auto;
    padding: 20px;
}

.info-group {
    margin-bottom: 15px;
}

.info-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.info-value-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: monospace;
    font-size: 1rem;
    color: var(--text-primary);
}

.copy-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 5px;
    margin-left: 10px;
    transition: all 0.2s;
}

.copy-btn:hover {
    color: #4f46e5;
    transform: scale(1.1);
}

/* New Divider Style */
.divider {
    display: flex;
    align-items: center;
    margin: 20px 0 15px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.divider span {
    padding: 0 10px;
}

/* Rules Grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.rule-item {
    background: var(--bg-secondary);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.rule-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.rule-value {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.welcome-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-highlight);
    text-align: center;
}

.btn-done {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-done:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-share {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-share:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.full-width {
    width: 100%;
}

.mb-2 {
    margin-bottom: 10px;
}

/* Animations */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}