/* ============================================
   SECHO GANG — Global Stylesheet
   ============================================ */

/* ----- Reset & Base ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #000;
    color: #fff;
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    user-select: none;
}

/* ----- CRT Scanline Effect ----- */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background:
        linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
        linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    animation: crt 0.3s infinite;
}

@keyframes crt {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 0.9;
    }

    100% {
        opacity: 0.8;
    }
}

/* ----- CRT Flicker Effect ----- */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 2;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% {
        opacity: 0.27861;
    }

    5% {
        opacity: 0.34769;
    }

    10% {
        opacity: 0.23604;
    }

    15% {
        opacity: 0.90626;
    }

    20% {
        opacity: 0.18128;
    }

    25% {
        opacity: 0.83891;
    }

    30% {
        opacity: 0.65583;
    }

    35% {
        opacity: 0.67807;
    }

    40% {
        opacity: 0.26559;
    }

    45% {
        opacity: 0.84693;
    }

    50% {
        opacity: 0.96019;
    }

    55% {
        opacity: 0.08594;
    }

    60% {
        opacity: 0.20313;
    }

    65% {
        opacity: 0.71988;
    }

    70% {
        opacity: 0.53455;
    }

    75% {
        opacity: 0.37288;
    }

    80% {
        opacity: 0.71428;
    }

    85% {
        opacity: 0.70419;
    }

    90% {
        opacity: 0.7003;
    }

    95% {
        opacity: 0.36108;
    }

    100% {
        opacity: 0.24387;
    }
}

/* ----- Container ----- */
#container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    text-align: center;
    padding: 20px;
}

/* ----- Warning Icon ----- */
.warning-icon {
    font-size: 120px;
    margin: 20px 0;
    text-shadow: 0 0 30px rgba(255, 255, 255, 1);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* ----- Typography ----- */
.big-text {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: 700;
    margin: 20px 0;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.9);
}

.apple-text {
    color: #fff;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.8;
    margin: 15px 0;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}

.access-granted {
    color: #00ff66;
    font-family: 'Courier New', monospace;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 0 25px rgba(0, 255, 102, 0.9);
    margin: 20px 0;
}

/* ----- Form Elements ----- */
.input-group {
    margin: 30px 0;
}

input,
select {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    outline: none;
    margin: 10px auto;
    display: block;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

select option {
    background: #000;
    color: #fff;
}

button {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
    padding: 15px 40px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin: 10px 5px;
    transition: all 0.3s;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
}

button:hover:not(:disabled) {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ----- Progress Bar ----- */
.progress-container {
    width: 100%;
    max-width: 400px;
    height: 30px;
    border: 2px solid #fff;
    margin: 20px auto;
    position: relative;
    overflow: hidden;
    display: none;
}

.progress-bar {
    height: 100%;
    background: #fff;
    width: 0%;
    transition: width 0.1s linear;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    z-index: 1;
    mix-blend-mode: difference;
}

/* ----- Error State ----- */
.error-state * {
    color: #ff0000 !important;
    border-color: #ff0000 !important;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.8) !important;
}

.error-state .progress-bar {
    background: #ff0000 !important;
}

/* ----- Animations ----- */
.shake {
    animation: shake 0.5s infinite;
}

@keyframes shake {

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

    10% {
        transform: translate(-10px, -10px);
    }

    20% {
        transform: translate(10px, 10px);
    }

    30% {
        transform: translate(-10px, 10px);
    }

    40% {
        transform: translate(10px, -10px);
    }

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

    60% {
        transform: translate(10px, 10px);
    }

    70% {
        transform: translate(-10px, 10px);
    }

    80% {
        transform: translate(10px, -10px);
    }

    90% {
        transform: translate(-10px, 10px);
    }
}

/* ----- Button Row ----- */
.btn-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

/* ============================================
   REGISTRATION PAGE — Specific Styles
   ============================================ */

/* ----- Full-height Container (registration) ----- */
.container-full {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ----- Screen System ----- */
.screen {
    display: none;
    width: 100%;
    max-width: 600px;
    text-align: center;
    animation: fadeIn 0.5s;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ----- Info Text (Inter font) ----- */
.info-text {
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 300;
    line-height: 1.8;
    margin: 20px 0;
}

/* ----- Camera ----- */
.camera-container {
    position: relative;
    max-width: 400px;
    margin: 20px auto;
}

#cameraFeed {
    width: 100%;
    border: 2px solid #fff;
    display: none;
}

#photoPreview {
    width: 100%;
    border: 2px solid #fff;
    display: none;
}

/* ----- Processing Log ----- */
.log-container {
    text-align: left;
    max-width: 500px;
    margin: 20px auto;
    max-height: 300px;
    overflow-y: auto;
}

.log-line {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin: 5px 0;
    opacity: 0;
    animation: fadeInLog 0.3s forwards;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.6);
}

@keyframes fadeInLog {
    to {
        opacity: 1;
    }
}

/* ----- ID Card ----- */
.id-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border: 3px solid #fff;
    padding: 30px;
    max-width: 450px;
    margin: 30px auto;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    text-align: left;
}

.id-card-header {
    text-align: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #fff;
    padding-bottom: 15px;
}

.id-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 3px;
    margin-bottom: 5px;
}

.id-card-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    opacity: 0.7;
    letter-spacing: 2px;
}

.id-card-content {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.id-photo {
    width: 150px;
    height: 150px;
    border: 2px solid #fff;
    object-fit: cover;
}

.id-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.id-field {
    margin: 5px 0;
    font-family: 'Inter', sans-serif;
}

.id-label {
    font-size: 11px;
    opacity: 0.6;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.id-value {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

.id-qr {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #fff;
}

#qrcode {
    display: inline-block;
    padding: 10px;
    background: #fff;
}

#qrcode canvas {
    display: none !important;
}

#qrcode img {
    display: block !important;
}

/* ----- Social Links ----- */
.social-links {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1.5px;
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
    white-space: nowrap;
}

.social-link:hover {
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.5) inset;
    background: rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 15px rgba(255, 255, 255, 1);
}

.social-link svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    padding: 12px 24px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    margin-top: 10px;
    transition: all 0.3s;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.home-btn:hover {
    border-color: #fff;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 255, 255, 0.5) inset;
    background: rgba(255, 255, 255, 0.08);
    text-shadow: 0 0 15px rgba(255, 255, 255, 1);
}

/* ----- Fade Animations ----- */
.fade-out {
    animation: fadeOut 1s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

.fade-in {
    animation: fadeIn 0.5s forwards;
}

/* ============================================
   CONFIRMATION PAGE — Specific Styles
   ============================================ */

#checkmark-wrap {
    margin: 0 auto 30px;
    width: 100px;
    height: 100px;
    opacity: 0;
    animation: zoomIn 0.6s ease forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

#checkmark-svg {
    width: 100px;
    height: 100px;
}

#check-circle {
    stroke-dasharray: 314;
    stroke-dashoffset: 314;
    animation: drawCircle 0.6s ease 0.6s forwards;
}

#check-mark {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    animation: drawCheck 0.4s ease 1s forwards;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.msg-block {
    overflow: hidden;
}

.msg1 {
    color: #00ff66;
    font-family: 'Courier New', monospace;
    font-size: 36px;
    font-weight: 700;
    text-shadow: 0 0 25px rgba(0, 255, 102, 0.9);
    margin: 20px 0;
    min-height: 48px;
}

.msg2,
.msg3 {
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.8;
    margin: 20px 0 10px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    min-height: 30px;
}

.msg3 {
    font-weight: 700;
}

.social-links.visible {
    opacity: 1;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 600px) {
    .big-text {
        font-size: 18px;
    }

    .warning-icon {
        font-size: 80px;
    }

    .access-granted {
        font-size: 24px;
    }

    input,
    button {
        font-size: 14px;
        padding: 12px;
    }

    .id-card-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .id-photo {
        margin: 0 auto;
    }

    .msg1 {
        font-size: 24px;
    }

    .msg2,
    .msg3 {
        font-size: 15px;
    }

    .social-link {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    body::before,
    body::after,
    .scan-line,
    .noise,
    .vhs-line {
        display: none !important;
    }
    body {
        background: #ffffff !important;
    }
}