:root {
    --font-sans: 'Golos Text', sans-serif;
    --bg-color: #eff1fe;
    --text-main: #060C34;
    --primary: #2051F4;
    --secondary: #FF9D00;
    --accent: #5890FF;
    --destructive: #E61276;
    --white: #ffffff;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.bg-fixed {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-repeat: no-repeat;
    background-position: right top;
    background-size: contain;
    z-index: -1;
    pointer-events: none;
}

header {
    padding: 1.5rem;
}

.logo {
    height: 4rem;
    object-fit: contain;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 56rem; /* max-w-4xl */
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    transition: all 0.3s ease;
}

.progress-bar {
    height: 0.5rem;
    background-color: var(--slate-100);
    width: 100%;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-top-right-radius: 9999px;
    border-bottom-right-radius: 9999px;
    width: 0%;
    transition: width 0.3s ease;
}

.card-content {
    padding: 2rem;
}

@media (min-width: 768px) {
    .card-content {
        padding: 2.5rem;
    }
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 2rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 2px solid transparent;
    background-color: var(--slate-50);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: rgba(6, 12, 52, 0.8);
}

.radio-label:hover {
    background-color: var(--slate-100);
}

.radio-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.radio-input:checked + .radio-label {
    border-color: var(--primary);
    background-color: rgba(32, 81, 244, 0.05);
    color: var(--primary);
}

.radio-circle {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 2px solid rgba(6, 12, 52, 0.2);
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
}

.radio-input:checked + .radio-label .radio-circle {
    border-color: var(--primary);
    background-color: var(--primary);
}

.inner-circle {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: white;
    opacity: 0;
    transition: opacity 0.2s;
}

.radio-input:checked + .radio-label .inner-circle {
    opacity: 1;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 500;
    height: 3.5rem;
    padding: 0 2rem;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    outline: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(32, 81, 244, 0.2);
    width: 100%;
}

@media (min-width: 768px) {
    .btn-primary {
        width: auto;
        min-width: 200px;
    }
}

.btn-primary:hover:not(:disabled) {
    background-color: rgba(32, 81, 244, 0.9);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 10px 15px -3px rgba(255, 157, 0, 0.2);
    flex: 1;
}

.btn-secondary:hover {
    background-color: rgba(255, 157, 0, 0.9);
}

.btn-outline {
    border: 2px solid rgba(6, 12, 52, 0.1);
    color: var(--text-main);
    background: transparent;
    flex: 1;
}

.btn-outline:hover {
    background-color: var(--slate-50);
}

/* Loading State */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.5rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 28rem;
    margin: 0 auto;
}

.spinner {
    width: 4rem;
    height: 4rem;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Result State */
.result-card {
    background: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.top-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0.25rem;
    background: linear-gradient(to right, var(--primary), var(--accent), var(--destructive));
}

.result-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.check-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.result-text-box {
    background-color: var(--slate-50);
    padding: 1.5rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-100);
    margin-bottom: 2rem;
    white-space: pre-line;
    color: rgba(6, 12, 52, 0.8);
    font-size: 1.125rem;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .actions {
        flex-direction: row;
    }
}

/* Admin Styles */
.admin-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 16rem;
    background: white;
    padding: 1.5rem;
    border-right: 1px solid var(--slate-200);
    display: flex;
    flex-direction: column;
}

.admin-main {
    flex: 1;
    padding: 2.5rem;
    overflow-y: auto;
}

.input-field {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--slate-200);
    margin-top: 0.5rem;
}

.tree-node {
    border: 1px solid var(--slate-200);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    background: white;
    overflow: hidden;
}

.node-header {
    padding: 1rem;
    background: var(--slate-50);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.node-content {
    padding: 1rem;
    border-top: 1px solid var(--slate-200);
}

.hidden {
    display: none;
}
