@font-face {
    font-family: 'DelaGothicOne';
    src: url('../fonts/DelaGothicOne-Regular.ttf') format('truetype');
    font-display: swap;
}

@font-face {
    font-family: 'MiSans-Regular';
    src: url('../fonts/MiSans-Regular.ttf') format('truetype');
    font-display: swap;
}

:root {
    --install-blue: #00d4ff;
    --install-blue-soft: rgba(0, 212, 255, 0.3);
    --install-dark: #05070a;
    --install-panel: #141b2d;
    --install-border: #2a3b55;
    --install-text: #e0e6ed;
    --install-subtext: #8daec4;
    --install-ok: #00ff9d;
    --install-error: #ff5e75;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body.install-page {
    min-height: 100vh;
    background: var(--install-dark);
    color: var(--install-text);
    font-family: 'MiSans-Regular', 'Segoe UI', Tahoma, sans-serif;
    overflow-x: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}

.install-page .fog {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(0, 212, 255, 0.06), transparent 40%),
        radial-gradient(circle at 80% 65%, rgba(0, 100, 255, 0.08), transparent 45%);
    z-index: 0;
    pointer-events: none;
}

.install-page .ambient-glow {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, rgba(10, 20, 40, 0) 0%, #05070a 88%);
    z-index: 1;
    pointer-events: none;
}

.install-page .bg-rune {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(84vw, 1100px);
    height: min(84vw, 1100px);
    border: 2px solid rgba(0, 212, 255, 0.05);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    animation: installRotateRune 80s linear infinite;
}

.install-page .bg-rune::before {
    content: '';
    position: absolute;
    inset: 11%;
    border: 1px dashed rgba(0, 212, 255, 0.08);
    border-radius: 50%;
}

.install-page .container {
    position: relative;
    z-index: 10;
    width: min(1240px, calc(100% - 32px));
    margin: 50px 0;
    padding: 34px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: rgba(20, 27, 45, 0.62);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 6px;
    box-shadow:
        0 0 40px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 212, 255, 0.05);
    backdrop-filter: blur(10px);
}

.install-page .container::before {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    bottom: -2px;
    left: -2px;
    border-radius: 8px;
    background: linear-gradient(45deg, transparent 42%, rgba(0, 212, 255, 0.28) 50%, transparent 58%);
    z-index: -1;
    opacity: 0.5;
    pointer-events: none;
}

.install-page header {
    text-align: center;
    padding-bottom: 12px;
}

.install-page h1 {
    margin: 0 0 8px;
    font-family: 'DelaGothicOne', sans-serif;
    font-size: clamp(34px, 4.4vw, 60px);
    letter-spacing: 2px;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-stroke: 2px #16647f;
    background: linear-gradient(180deg, #ffffff 20%, #16647f 60%, #20d4f8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 14px rgba(0, 212, 255, 0.7);
}

.install-page .subtitle {
    color: var(--install-subtext);
    font-size: clamp(14px, 1.7vw, 18px);
    letter-spacing: 0.6px;
}

.install-page .separator {
    width: 100%;
    height: 2px;
    margin-top: 16px;
    background: linear-gradient(90deg, transparent 0%, var(--install-blue) 50%, transparent 100%);
    box-shadow: 0 0 10px var(--install-blue);
    position: relative;
}

.install-page .separator::after {
    content: '♦';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 0 10px;
    color: var(--install-blue);
    text-shadow: 0 0 5px var(--install-blue);
    background: #141b2d;
    font-size: 14px;
}

.install-page .console-panel {
    background: rgba(10, 14, 26, 0.86);
    border: 1px solid var(--install-border);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.install-page .console-header {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    padding: 14px 24px;
    background: rgba(0, 212, 255, 0.05);
    border-bottom: 1px solid var(--install-border);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    color: var(--install-blue);
    font-weight: 700;
}

.install-page .table-list-container {
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--install-blue) #0a0e1a;
}

.install-page .table-list-container::-webkit-scrollbar {
    width: 6px;
}

.install-page .table-list-container::-webkit-scrollbar-track {
    background: #0a0e1a;
}

.install-page .table-list-container::-webkit-scrollbar-thumb {
    background: var(--install-border);
    border-radius: 3px;
}

.install-page .table-list-container::-webkit-scrollbar-thumb:hover {
    background: var(--install-blue);
}

.install-page .table-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 24px;
    border-bottom: 1px solid rgba(42, 59, 85, 0.42);
    transition: all 0.22s ease;
}

.install-page .table-row:hover {
    background: rgba(0, 212, 255, 0.03);
    padding-left: 30px;
}

.install-page .table-row.is-pending {
    background: rgba(255, 51, 51, 0.06);
}

.install-page .table-name {
    color: #c0cddb;
    font-family: Consolas, Monaco, monospace;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.install-page .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.install-page .status-badge.installed {
    color: var(--install-ok);
    border: 1px solid rgba(0, 255, 157, 0.3);
    background: rgba(0, 255, 157, 0.1);
    box-shadow: 0 0 5px rgba(0, 255, 157, 0.2);
}

.install-page .status-badge.pending {
    color: var(--install-error);
    border: 1px solid rgba(255, 94, 117, 0.35);
    background: rgba(255, 94, 117, 0.1);
    box-shadow: 0 0 5px rgba(255, 94, 117, 0.18);
}

.install-page .pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: currentColor;
}

.install-page .auth-section {
    padding: 20px;
    border-radius: 6px;
    border: 1px solid var(--install-border);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.install-page .auth-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--install-subtext);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
}

.install-page .input-wrapper {
    position: relative;
    width: min(460px, 100%);
}

.install-page .input-wrapper > i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--install-blue);
    font-size: 18px;
}

.install-page .input-wrapper input[type='password'],
.install-page .input-wrapper input[type='text'] {
    width: 100%;
    height: 52px;
    padding: 0 50px 0 45px;
    border-radius: 4px;
    border: 1px solid var(--install-border);
    background: rgba(10, 14, 26, 0.9);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.24s ease;
}

.install-page .input-wrapper input[type='password']:focus,
.install-page .input-wrapper input[type='text']:focus {
    border-color: var(--install-blue);
    box-shadow:
        0 0 14px rgba(0, 212, 255, 0.18),
        inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.install-page .password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 212, 255, 0.35);
    border-radius: 6px;
    background: rgba(7, 12, 20, 0.74);
    color: #a7e9f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.install-page .password-toggle:hover {
    color: #fff;
    border-color: rgba(0, 212, 255, 0.7);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.install-page .install-error {
    border-radius: 8px;
    border: 1px solid rgba(255, 111, 127, 0.45);
    background: rgba(68, 18, 28, 0.5);
    color: #ffe0e5;
    padding: 10px 12px;
    font-size: 14px;
    width: fit-content;
    max-width: 100%;
}

.install-page .cta-btn {
    min-height: 58px;
    border: 1px solid var(--install-blue);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.12) 0%, rgba(0, 85, 255, 0.12) 100%);
    color: #fff;
    font-family: 'DelaGothicOne', sans-serif;
    font-size: 17px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.12);
    position: relative;
    overflow: hidden;
}

.install-page .cta-btn:hover {
    text-shadow: 0 0 8px #fff;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.22) 0%, rgba(0, 85, 255, 0.22) 100%);
}

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

.install-page .cta-btn:hover::before {
    left: 100%;
}

.install-page .corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--install-blue);
    transition: all 0.24s ease;
}

.install-page .c-tl {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.install-page .c-tr {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.install-page .c-bl {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.install-page .c-br {
    right: 0;
    bottom: 0;
    border-left: none;
    border-top: none;
}

.install-page .console-panel:hover .corner {
    width: 30px;
    height: 30px;
    box-shadow: 0 0 10px var(--install-blue-soft);
}

@media (max-width: 980px) {
    .install-page .container {
        padding: 20px;
    }

    .install-page .table-row,
    .install-page .console-header {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .install-page .table-row:hover {
        padding-left: 24px;
    }
}

@media (max-width: 560px) {
    .install-page .container {
        width: calc(100% - 16px);
        margin: 20px 0;
        padding: 14px;
    }

    .install-page .table-row,
    .install-page .console-header {
        padding-left: 14px;
        padding-right: 14px;
    }

    .install-page .auth-section {
        padding: 14px;
    }

    .install-page .cta-btn {
        width: 100%;
        font-size: 14px;
    }
}

@keyframes installRotateRune {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
