/* ===================================
   Codes Page Specific Styles
   Enhanced User Experience
   =================================== */

/* Page Header Enhanced */
.page-header {
    background: linear-gradient(135deg, #0f1f0f 0%, #1a3d1a 100%);
    padding: 3rem 0;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid var(--accent-color);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2390a955' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    animation: floatPattern 20s linear infinite;
}

@keyframes floatPattern {
    from { transform: translateY(0); }
    to { transform: translateY(-60px); }
}

.page-header h1 {
    font-size: 3rem;
    background: linear-gradient(135deg, #90a955 0%, #a5d6a7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Stats Section Enhanced */
.stats-section {
    padding: 2rem 0;
    background: rgba(26, 77, 46, 0.1);
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(19, 24, 19, 0.9) 0%, rgba(13, 18, 13, 0.9) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(144, 169, 85, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(144, 169, 85, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-card:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(144, 169, 85, 0.2);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 10px rgba(144, 169, 85, 0.5));
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.3rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Codes Section Enhanced */
.codes-section {
    padding: 3rem 0;
    position: relative;
}

.codes-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

/* Code Card Redesigned */
.code-card {
    background: linear-gradient(135deg, #131813 0%, #0f140f 100%);
    border-radius: 16px;
    padding: 0;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.code-card.active {
    border-color: rgba(144, 169, 85, 0.5);
    background: linear-gradient(135deg, #1a2d1a 0%, #131f13 100%);
}

.code-card.special {
    border-color: rgba(255, 193, 7, 0.5);
    background: linear-gradient(135deg, #2d2d1a 0%, #1f1f13 100%);
}

.code-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.code-card.active:hover {
    box-shadow: 0 15px 40px rgba(144, 169, 85, 0.2);
}

.code-card.special:hover {
    box-shadow: 0 15px 40px rgba(255, 193, 7, 0.2);
}

/* Code Header */
.code-header {
    padding: 1rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(144, 169, 85, 0.2);
}

.code-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse 2s ease-in-out infinite;
}

.code-badge.new {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
    color: white;
}

.code-badge.special {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
}

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

.code-status {
    color: #4caf50;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Code Main Section */
.code-main {
    padding: 1.5rem;
}

.code-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.4);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(144, 169, 85, 0.2);
}

.code-text {
    font-family: 'Courier New', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 2px;
    flex: 1;
    text-shadow: 0 0 10px rgba(144, 169, 85, 0.3);
}

/* Copy Button Enhanced */
.btn-copy-code {
    padding: 0.6rem 1.2rem;
    background: linear-gradient(135deg, #4f772d 0%, #1a4d2e 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-copy-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-copy-code:hover::before {
    left: 100%;
}

.btn-copy-code:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 119, 45, 0.3);
}

.btn-copy-code:active {
    transform: translateY(0);
}

.copy-icon {
    font-size: 1.1rem;
}

/* Code Reward */
.code-reward {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: rgba(144, 169, 85, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(144, 169, 85, 0.2);
}

.reward-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px rgba(144, 169, 85, 0.5));
}

.reward-text {
    color: var(--text-secondary);
}

.reward-text strong {
    color: var(--accent-color);
}

/* Code Description */
.code-description {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.code-description strong {
    color: #ffc107;
}

/* Guide Tips Enhanced */
.guide-tip {
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.guide-tip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    animation: slideRight 3s linear infinite;
}

@keyframes slideRight {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.guide-tip.success {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(76, 175, 80, 0.05) 100%);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.guide-tip.info {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.05) 100%);
    border: 1px solid rgba(33, 150, 243, 0.3);
    color: #2196f3;
}

.guide-tip.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.05) 100%);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.tip-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 0 5px currentColor);
}

.tip-content {
    flex: 1;
    color: var(--text-primary);
}

.tip-content strong {
    color: inherit;
    font-weight: 700;
}

/* Redeem Section Enhanced */
.redeem-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.05) 0%, transparent 100%);
}

.redeem-guide {
    display: grid;
    gap: 3rem;
}

.redeem-steps {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.step-card {
    background: linear-gradient(135deg, #131813 0%, #0f140f 100%);
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: center;
    width: 100%;
    max-width: 600px;
    border: 1px solid rgba(144, 169, 85, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(144, 169, 85, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step-card:hover::before {
    opacity: 1;
}

.step-card:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: -5px 5px 20px rgba(144, 169, 85, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #4f772d 0%, #1a4d2e 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 5px 15px rgba(79, 119, 45, 0.3);
}

.step-content h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.step-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 10px rgba(144, 169, 85, 0.3));
}

.step-arrow {
    font-size: 2rem;
    color: var(--accent-color);
    opacity: 0.5;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* Video Guide */
.video-guide {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.video-container {
    width: 100%;
    max-width: 800px;
    background: linear-gradient(135deg, #1a2d1a 0%, #131f13 100%);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid rgba(144, 169, 85, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    min-height: 600px;
}

.video-container:hover {
    border-color: var(--accent-color);
    box-shadow: 0 15px 50px rgba(144, 169, 85, 0.2);
}

.video-title {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(144, 169, 85, 0.3);
}

.video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    display: block;
}

/* Fallback for browsers that don't support aspect-ratio */
@supports not (aspect-ratio: 16/9) {
    .video-wrapper {
        padding-bottom: 56.25%;
        height: 0;
    }
    
    .video-wrapper iframe {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.video-description {
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

/* Loading state for video */
.video-wrapper::before {
    content: '⏳ Loading video...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    font-size: 1.2rem;
    z-index: -1;
}

/* Mobile responsive for video */
@media (max-width: 768px) {
    .video-container {
        padding: 1.5rem;
    }
    
    .video-title {
        font-size: 1.2rem;
    }
    
    .video-description {
        font-size: 0.9rem;
    }
}

/* Gems Section Enhanced */
.gems-section {
    padding: 4rem 0;
    background: var(--darker-bg);
}

.gems-uses {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.use-card {
    background: linear-gradient(135deg, #131813 0%, #0f140f 100%);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(144, 169, 85, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.use-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.use-card:hover::after {
    transform: translateX(0);
}

.use-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(144, 169, 85, 0.1);
}

.use-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

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

.use-card h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Expired Codes Section */
.expired-codes-section {
    padding: 4rem 0;
}

.expired-message {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(19, 24, 19, 0.5) 0%, rgba(13, 18, 13, 0.5) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(144, 169, 85, 0.3);
}

.expired-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(144, 169, 85, 0.3));
}

.expired-message h3 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.expired-message .note {
    color: var(--text-secondary);
    font-style: italic;
    margin-top: 1rem;
}

/* FAQ Section Enhanced */
.faq-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, rgba(26, 77, 46, 0.03) 0%, transparent 100%);
}

.faq-grid {
    display: grid;
    gap: 2rem;
}

.faq-card {
    background: linear-gradient(135deg, #131813 0%, #0f140f 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(144, 169, 85, 0.2);
    transition: all 0.3s ease;
}

.faq-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(144, 169, 85, 0.1);
}

.faq-question {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: rgba(144, 169, 85, 0.1);
}

.faq-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

.faq-question h3 {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin: 0;
}

.faq-answer {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
    line-height: 1.7;
}

.faq-answer ul {
    margin-left: 1.5rem;
    margin-top: 0.5rem;
}

.faq-answer strong {
    color: var(--accent-color);
}

/* Social Section Enhanced */
.social-section {
    padding: 4rem 0;
    background: var(--darker-bg);
}

.social-cta {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #1a2d1a 0%, #131f13 100%);
    border-radius: 16px;
    border: 2px solid rgba(144, 169, 85, 0.3);
}

.social-cta h2 {
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.social-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.social-btn {
    padding: 1rem 2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left 0.5s ease;
}

.social-btn:hover::before {
    left: 100%;
}

.social-btn.discord {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.social-btn.twitter {
    background: linear-gradient(135deg, #1DA1F2 0%, #1a8cd8 100%);
    color: white;
}

.social-btn.youtube {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
    color: white;
}

.social-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.social-icon {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .code-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .code-text {
        font-size: 1.1rem;
        text-align: center;
    }
    
    .btn-copy-code {
        justify-content: center;
    }
    
    .step-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .step-icon {
        display: none;
    }
    
    .gems-uses {
        grid-template-columns: 1fr;
    }
    
    .social-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .social-btn {
        width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

/* Accessibility Improvements */
.btn-copy-code:focus,
.social-btn:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.code-card:focus-within {
    border-color: var(--accent-color);
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .social-section,
    .video-guide {
        display: none;
    }
    
    .code-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .code-text {
        font-size: 1rem;
        color: black;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Loading Animation for Code Cards */
@keyframes cardLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.code-card {
    animation: cardLoad 0.6s ease-out backwards;
}

.code-card:nth-child(1) { animation-delay: 0.1s; }
.code-card:nth-child(2) { animation-delay: 0.2s; }
.code-card:nth-child(3) { animation-delay: 0.3s; }

/* Interactive Hover Effects */
.code-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(144, 169, 85, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.code-card:hover::before {
    opacity: 1;
}