/* ==================================================================
FINAL WUTHERING WAVES LOCKER
==================================================================
*/
:root {
    --bg-main: #1a1b26;
    --bg-surface: rgba(26, 27, 38, 0.85); /* Increased opacity */
    --border-color: rgba(94, 103, 130, 0.4); /* Slightly brighter border */
    --text-primary: #e2e2ee;
    --text-secondary: #8c8ea3;
    --accent-primary: #04d361; /* Green primary */
    --accent-secondary: #00b359; /* Darker green */
    --accent-yellow: #f5d490; /* New yellow for offers */
    --accent-yellow-dark: #eec87a; /* Darker yellow for offer borders */
    --error-color: #f47174;
    --success-color: #63e6be;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden; /* Hide scrollbars from the body */
    position: relative; /* Needed for the overlay */
}

/* Dark overlay to dim the video */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Black with 70% opacity */
    z-index: -1;
}

.background-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -2; /* Placed behind the overlay */
    transform: translateX(-50%) translateY(-50%);
    background-size: cover;
}

.container {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 60px rgba(0, 0, 0, 0.5); /* Enhanced shadow */
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 520px;
    text-align: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
}

/* Language Selector */
.lang-selector-wrapper {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px;
    transition: all 0.2s ease;
}
.lang-selector-wrapper:hover {
    background-color: rgba(0,0,0,0.4);
}
.lang-selector-wrapper i {
    color: var(--text-secondary);
    margin: 0 8px;
}
#lang-selector {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 4px 8px 4px 4px;
}
#lang-selector:focus {
    outline: none;
}
#lang-selector option {
    background: var(--bg-main);
    color: var(--text-primary);
    border: none;
}
[dir="rtl"] .lang-selector-wrapper {
    right: auto;
    left: 1.5rem;
}

/* Phase Animation System */
.phase {
    opacity: 0;
    transform: scale(0.98) translateY(10px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    display: none;
}
.phase.active {
    opacity: 1;
    transform: scale(1) translateY(0);
    display: block;
}

.logoimg {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 1.5rem auto;
    display: block;
    border: 2px solid var(--border-color);
}

h1.text1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

p.text2 {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Code Display Styling */
.code-display {
    background-color: rgba(29, 33, 44, 0.7);
    border: 1px dashed var(--border-color);
    font-family: 'SF Mono', 'Consolas', 'monospace';
    letter-spacing: 3px;
    padding: 1.25rem;
    border-radius: 8px;
    margin: 2rem auto;
    position: relative;
    font-size: 1.5rem;
    color: var(--text-primary);
    word-wrap: break-word;
}
.code-display span.hidden-chars {
    color: var(--text-secondary);
    filter: blur(3px);
    user-select: none;
}

/* ==================================================================
OFFER SECTION STYLING (UPDATED FOR IFRAME)
==================================================================
*/
#offersSection {
    margin: 2rem 0;
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    width: 100%;
}

/* New Class for OG Ads Iframe */
.og-locker-frame {
    width: 100%;
    height: 800px;  /* بدلت الطول من 400 لـ 800 باش يبان كلشي */
    border: none;
    border-radius: 8px;
    background-color: transparent;
}

.gradient {
    display: block;
    width: 100%;
    background-color: var(--accent-primary); /* Solid yellow background */
    border: 1px solid var(--accent-primary); /* Solid yellow border */
    color: var(--bg-main); /* Dark text for contrast */
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
}
.gradient:hover {
    border-color: var(--accent-primary);
    background-color: var(--accent-primary); /* Darker yellow bg on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(245, 212, 144, 0.2);
}

/* Buttons */
.button-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* Space between buttons */
}

.action-button {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 320px;
}
.action-button:hover {
    transform: translateY(-2px);
}

/* Primary Button Style (Green) */
.action-button:not(.secondary) {
    background: linear-gradient(90deg, var(--accent-secondary), var(--accent-primary));
    color: #fff;
    box-shadow: 0 4px 20px rgba(4, 211, 97, 0.2);
}
.action-button:not(.secondary):hover {
    box-shadow: 0 6px 25px rgba(4, 211, 97, 0.3);
}

/* Secondary Button Style (Tutorial) */
.action-button.secondary {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}
.action-button.secondary:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}


#tutorialVideo {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, margin-top 0.5s ease-in-out, border 0.5s ease-in-out;
    border-radius: 8px;
    margin-top: 0;
    border: 0px solid transparent;
}
#tutorialVideo.active {
    max-height: 500px;
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}
#tutorialVideo iframe {
    display: block;
    border: none;
}

/* Verification Phase Specifics */
.spinner {
    width: 48px;
    height: 48px;
    border: 5px solid var(--border-color);
    border-bottom-color: var(--accent-primary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
    margin: 1.5rem auto;
}
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

p.text2.error {
    color: var(--error-color);
    font-weight: 500;
}

/* Final Code Display */
#copy-button {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}
#copy-button:hover {
    color: var(--accent-primary);
}
#copy-feedback {
    color: var(--success-color);
    height: 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}