:root {
    --d-navy: #020617;
    --d-blue: #3b82f6;
    --d-royal: #1d4ed8;
    --d-slate: #1e293b;
    --d-text: #f8fafc;
    --d-muted: #94a3b8;
    --d-glass: rgba(15, 23, 42, 0.7);
    --d-border: rgba(255, 255, 255, 0.08);
    --d-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body.diamond-v2-theme {
    background-color: var(--d-navy);
    color: var(--d-text);
    font-family: 'Outfit', sans-serif;
    height: 100dvh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#particles-js {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.ambient-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    filter: blur(80px);
    z-index: 2;
    animation: glowFloat 15s infinite alternate ease-in-out;
}

@keyframes glowFloat {
    from {
        transform: translate(-20%, -20%);
    }

    to {
        transform: translate(20%, 20%);
    }
}

.viewport-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.auth-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Diamond Card V2 */
.diamond-card {
    width: 100%;
    background: var(--d-glass);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--d-border);
    border-radius: 45px;
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.7);
    animation: cardEntrance 1.2s var(--d-ease) forwards;
    overflow: hidden;
    position: relative;
}

.diamond-card.shake {
    animation: cardShake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes cardShake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.card-interior {
    padding: 60px 45px;
}

/* Branding Fancy */
.diamond-branding {
    text-align: center;
    margin-bottom: 45px;
}

.logo-zone {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 30px;
}

.jo-logo-premium {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--d-blue), var(--d-royal));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    font-weight: 950;
    color: #fff;
    position: relative;
    z-index: 5;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
    overflow: hidden;
    animation: iconFloat 4s infinite ease-in-out, logoEntrance 1s var(--d-ease) both;
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: rotate(-20deg) scale(0.5);
    }

    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

/* Logo Reflection (Odblask) */
.glint-effect {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    animation: glintMove 4s infinite;
}

@keyframes glintMove {
    0% {
        left: -150%;
    }

    30% {
        left: 150%;
    }

    100% {
        left: 150%;
    }
}

.logo-shadow {
    position: absolute;
    inset: -10px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    filter: blur(15px);
    z-index: 1;
}

.fancy-title {
    font-size: 36px;
    font-family: 'Unbounded', sans-serif;
    font-weight: 900;
    letter-spacing: -1px;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.6);
    animation: titleEntrance 1s 0.2s var(--d-ease) both;
}

@keyframes titleEntrance {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fancy-title span {
    display: none;
}

.fancy-subtitle {
    font-size: 14px;
    font-weight: 800;
    color: #64748b;
    letter-spacing: 3px;
    opacity: 0.9;
}

/* Fancy Input */
.fancy-input-group {
    position: relative;
    margin-bottom: 35px;
}

.fancy-input-group input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--d-border);
    border-radius: 22px;
    padding: 28px 24px 12px;
    color: #fff;
    font-size: 17px;
    outline: none;
    transition: 0.4s var(--d-ease);
}

.fancy-input-group label {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--d-muted);
    font-size: 15px;
    font-weight: 600;
    pointer-events: none;
    transition: 0.4s var(--d-ease);
}

.fancy-input-group input:focus~label,
.fancy-input-group input:not(:placeholder-shown)~label {
    top: 20px;
    font-size: 10px;
    color: var(--d-blue);
    letter-spacing: 1px;
}

.fancy-input-group input:focus {
    border-color: var(--d-blue);
    background: rgba(59, 130, 246, 0.05);
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--d-blue);
    box-shadow: 0 0 15px var(--d-blue);
    opacity: 0;
    pointer-events: none;
    z-index: 5;
}

.fancy-input-group.scanning .scanner-line {
    animation: scanInput 1.5s infinite linear;
    opacity: 1;
}

@keyframes scanInput {
    0% {
        left: 0;
        height: 2px;
        top: 0;
        width: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
        width: 100%;
        height: 2px;
    }

    90% {
        opacity: 1;
        width: 100%;
        height: 2px;
        top: 100%;
    }

    100% {
        left: 0;
        width: 100%;
        height: 2px;
        top: 100%;
        opacity: 0;
    }
}

/* Button */
.diamond-btn {
    width: 100%;
    background: #fff;
    padding: 22px;
    border: none;
    border-radius: 24px;
    font-weight: 900;
    font-size: 16px;
    cursor: pointer;
    position: relative;
    transition: 0.4s;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    overflow: visible;
    /* Changed to visible for particles burst */
}

#btn-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}

.diamond-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(59, 130, 246, 0.3);
}

.diamond-btn.success {
    background: #10b981 !important;
    color: #fff !important;
}

.diamond-btn.error {
    background: #ef4444 !important;
    color: #fff !important;
}

.diamond-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-lbl {
    color: #020617;
    position: relative;
    z-index: 5;
}

.btn-glow-flow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.diamond-btn:hover .btn-glow-flow {
    transform: translateX(100%);
}

/* Info Pulse */
.info-pulse-section {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--d-border);
    animation: infoEntrance 1s 0.6s var(--d-ease) both;
}

@keyframes infoEntrance {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.p-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    box-shadow: 0 0 10px var(--d-blue);
    animation: dotPulse 2s infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.pulse-item p {
    font-size: 11px;
    font-weight: 600;
    color: var(--d-muted);
    letter-spacing: 0.5px;
}

.pulse-item span {
    color: var(--d-blue);
    cursor: pointer;
    transition: 0.3s;
    font-weight: 800;
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
}

.pulse-item span:hover {
    color: #fff;
    background: var(--d-blue);
    box-shadow: 0 0 15px var(--d-blue);
}

/* Toast notification - Tiny version */
.copy-toast {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(59, 130, 246, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.5px;
    opacity: 0;
    pointer-events: none;
    transition: 0.4s var(--d-ease);
    z-index: 100;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.copy-toast.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.diamond-footer {
    text-align: center;
    padding: 30px 0;
    opacity: 0.4;
}

.copyright {
    font-size: 11px;
}

/* Modal V2 */
.diamond-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(20px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: 0.4s;
}

.diamond-modal-backdrop.active {
    display: flex;
    opacity: 1;
}

.diamond-modal-card {
    width: 100%;
    max-width: 500px;
    background: #0f172a;
    border-radius: 40px;
    border: 1px solid var(--d-border);
    padding: 50px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform: translateY(30px);
    transition: 0.6s var(--d-ease);
}

.diamond-modal-backdrop.active .diamond-modal-card {
    transform: translateY(0);
}

.modal-glow-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--d-blue);
    box-shadow: 0 0 20px var(--d-blue);
}

.warn-icon {
    font-size: 50px;
    margin-bottom: 25px;
}

.modal-heading {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.law-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 24px;
    border-radius: 20px;
    text-align: left;
    border-left: 4px solid #ef4444;
    margin: 30px 0;
}

.law-box strong {
    color: #f87171;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.law-box p {
    font-size: 13px;
    color: #cbd5e1;
    line-height: 1.6;
}

.d-check {
    display: flex;
    text-align: left;
    gap: 15px;
    cursor: pointer;
    margin-bottom: 35px;
}

.d-check input {
    display: none;
}

.d-box {
    width: 22px;
    height: 22px;
    border: 2px solid var(--d-border);
    border-radius: 6px;
    flex-shrink: 0;
    transition: 0.3s;
    position: relative;
}

.d-check input:checked+.d-box {
    background: var(--d-blue);
    border-color: var(--d-blue);
    box-shadow: 0 0 15px var(--d-blue);
}

.d-box::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 900;
    display: none;
}

.d-check input:checked+.d-box::after {
    display: flex;
}

.d-txt {
    font-size: 13px;
    color: var(--d-muted);
}

/* Hyper-Premium Alert Boxes - Diamond V2 */
.diamond-feedback {
    margin-top: 30px;
    padding: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.diamond-feedback.active {
    opacity: 1;
    transform: translateY(0);
}

.diamond-feedback.error {
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(239, 68, 68, 0.1);
}

.diamond-feedback.error .feedback-icon {
    color: #f87171;
}

.diamond-feedback.error .feedback-text {
    color: #fca5a5;
}

.diamond-feedback.success {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6), 0 0 20px rgba(16, 185, 129, 0.1);
}

.diamond-feedback.success .feedback-icon {
    color: #34d399;
}

.diamond-feedback.success .feedback-text {
    color: #6ee7b7;
}

.feedback-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback-text {
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.4;
    font-family: 'Unbounded', sans-serif;
}

/* Decoration for the alert box */
.diamond-feedback::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
}

.diamond-feedback.error::before {
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
}

.diamond-feedback.success::before {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.modal-enter-btn {
    width: 100%;
    background: var(--d-blue);
    padding: 20px;
    border: none;
    border-radius: 24px;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    opacity: 0.3;
    pointer-events: none;
    transition: 0.4s;
}

.modal-enter-btn:not([disabled]) {
    opacity: 1;
    pointer-events: auto;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.4);
}

@media (max-width: 480px) {
    .card-interior {
        padding: 45px 25px;
    }

    .fancy-title {
        font-size: 34px;
    }
}