/* ================= GLOBAL BACKGROUND & OVERLAYS ================= */
#global-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -3;
    pointer-events: none;
}

#global-bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0f061c;
    opacity: 0.85;
    z-index: -2;
    pointer-events: none;
}

.global-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 245, 255, 0.05) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ================= PAGE WRAPPER ================= */
.sa-page-wrapper {
    position: relative;
    z-index: 1;
    padding-top: 40px;
    min-height: 100vh;
}

.sa-hero {
    text-align: center;
    padding: 20px;
}

.sa-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-top: 0;
    background: linear-gradient(to right, #00f6fe, #4facfe);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    text-shadow: 0 4px 15px rgba(0, 246, 254, 0.3);
}

.sa-subtitle {
    font-size: 1.2rem;
    color: #e2e8f0;
    max-width: 600px;
    margin: 0 auto;
}

/* Common Section Layout */
.sa-section {
    padding: 20px;
    margin-bottom: 20px;
}

.sa-section .ctf-feedback-section {
    padding: 0 !important;
    background-color: transparent !important;
}

.sa-container {
    max-width: 1200px;
    margin: 0 auto;
}

.sa-section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #fff;
    margin-bottom: 40px;
    font-weight: 700;
    position: relative;
}

.sa-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: #00f6fe;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Poster Card */
.sa-poster-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.sa-poster-image-container {
    width: 100%;
}

.sa-poster-image {
    width: 100%;
    height: auto;
    display: block;
}

.sa-poster-body {
    padding: 30px;
    text-align: center;
}

.sa-poster-desc {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.sa-poster-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #00f6fe 0%, #4facfe 100%);
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sa-poster-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 246, 254, 0.3);
}

/* Certificates Grid */
.sa-cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.sa-cert-card {
    background: rgba(10, 17, 40, 0.8);
    border: 1px solid #00f6fe;
    border-radius: 12px;
    padding: 25px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(0, 246, 254, 0.4), inset 0 0 10px rgba(0, 246, 254, 0.1);
}

.sa-cert-card:hover {
    background: rgba(0, 246, 254, 0.05);
    border-color: #00f6fe;
    transform: translateY(-5px);
    box-shadow: 0 0 25px rgba(0, 246, 254, 0.6), inset 0 0 15px rgba(0, 246, 254, 0.2);
}

.sa-cert-card:hover .cert-img-preview {
    transform: scale(1.05) !important;
}

.sa-cert-icon {
    font-size: 2.5rem;
    color: #00f6fe;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.sa-cert-card:hover .sa-cert-icon {
    transform: scale(1.1);
}

.sa-cert-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sa-cert-username {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
}

.sa-cert-name {
    color: #94a3b8;
    font-size: 0.95rem;
}

/* Modal View */
.sa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.sa-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sa-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #0f172a;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.sa-modal-overlay.active .sa-modal-content {
    transform: scale(1);
}

.sa-modal-close {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 40px;
    height: 40px;
    background: #ff4a3f;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 10;
    transition: background 0.3s ease;
}

.sa-modal-close:hover {
    background: #e03b30;
}

.sa-modal-body {
    padding: 20px;
    background: #000;
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    max-height: 70vh;
    overflow: hidden;
}

.sa-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sa-modal-iframe {
    width: 100%;
    height: 65vh;
    border: none;
}

.sa-modal-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.sa-download-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #00f6fe;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.sa-download-btn:hover {
    background: #00d5dc;
    box-shadow: 0 4px 15px rgba(0, 246, 254, 0.4);
}

@media (max-width: 768px) {
    .achievements-title {
        font-size: 2.2rem;
    }
    .sa-cert-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
    .sa-modal-close {
        top: 10px;
        right: 10px;
    }
}
