/* Base */
body {
    background: linear-gradient(135deg, #0a0a12 0%, #1a1a2e 50%, #0f0f1a 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    color: #e0e0e0;
    color-scheme: dark;
}

/* Stars background effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, #ffffff20, transparent),
        radial-gradient(1px 1px at 40px 70px, #ffffff15, transparent),
        radial-gradient(1px 1px at 50px 160px, #ffffff20, transparent),
        radial-gradient(1px 1px at 90px 40px, #ffffff15, transparent),
        radial-gradient(1px 1px at 130px 80px, #ffffff20, transparent),
        radial-gradient(2px 2px at 160px 120px, #ffffff25, transparent),
        radial-gradient(1px 1px at 200px 50px, #ffffff15, transparent),
        radial-gradient(1px 1px at 250px 180px, #ffffff20, transparent),
        radial-gradient(1px 1px at 300px 90px, #ffffff15, transparent);
    background-repeat: repeat;
    background-size: 350px 200px;
    pointer-events: none;
    z-index: 0;
}

/* Alert styling */
#liveAlertPlaceholder {
    position: fixed;
    z-index: 9999;
    top: 20px;
    right: 20px;
    width: 320px;
}

.alert {
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    color: #ffffff;
}

.alert > div {
    color: #ffffff;
}

.alert-success {
    background: linear-gradient(135deg, rgba(0, 100, 0, 0.8), rgba(0, 50, 0, 0.9));
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.2);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(100, 0, 0, 0.8), rgba(50, 0, 0, 0.9));
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.2);
}

/* Input styling */
.form-control {
    background: rgba(20, 20, 40, 0.9);
    border: 2px solid rgba(0, 212, 255, 0.4);
    border-radius: 12px;
    color: #e8f4f8;
    padding: 16px 20px;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.1), inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.form-control:focus {
    background: rgba(30, 30, 60, 0.95);
    border-color: rgba(0, 212, 255, 0.8);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4), inset 0 0 20px rgba(0, 0, 0, 0.3);
    outline: none;
    color: #e8f4f8;
}

.form-control::placeholder {
    color: #8ec8e8;
    opacity: 0.8;
}

/* Input with search icon */
.input-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #8ec8e8;
    pointer-events: none;
}

/* Search container */
.search-container {
    position: relative;
    z-index: 1;
    padding-top: 15vh;
}

/* Result cards */
.card {
    background: linear-gradient(145deg, rgba(15, 15, 30, 0.95), rgba(25, 25, 50, 0.9));
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 40px rgba(0, 212, 255, 0.1);
    backdrop-filter: blur(10px);
}

.card-img {
    object-fit: cover;
    height: 100%;
    opacity: 0.4;
}

.card-img-overlay {
    background: linear-gradient(to top, rgba(10, 10, 20, 0.95) 0%, rgba(10, 10, 20, 0.6) 50%, transparent 100%);
    padding: 24px;
}

/* Result info */
#result {
    position: relative;
    z-index: 1;
    margin-top: 30px;
}

#result > .card {
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Data labels */
dt {
    color: #00d4ff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

dd {
    color: #ffffff;
    margin-bottom: 8px;
}

/* Loading spinner */
.loading {
    position: fixed;
    z-index: 999;
    width: 60px;
    height: 60px;
    overflow: show;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.85);
    backdrop-filter: blur(5px);
}

.loading:not(:required) {
    font: 0/0 a;
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
}

.loading:not(:required):after {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    margin-left: -25px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #00d4ff;
    border-right-color: #00d4ff;
    animation: spinner 1s infinite linear;
    box-shadow: 0 0 20px #00d4ff, inset 0 0 20px rgba(0, 212, 255, 0.3);
}

@keyframes spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Class-specific glow */
.c1, .c2, .c3, .c4, .c5, .c6, .pochven {
    box-shadow: 0 0 30px var(--class-color, rgba(0, 212, 255, 0.3));
}

.c1 { --class-color: rgba(255, 200, 0, 0.4); }
.c2 { --class-color: rgba(255, 150, 0, 0.4); }
.c3 { --class-color: rgba(200, 100, 0, 0.4); }
.c4 { --class-color: rgba(150, 50, 0, 0.4); }
.c5 { --class-color: rgba(100, 0, 0, 0.4); }
.c6 { --class-color: rgba(50, 0, 0, 0.4); }
.pochven { --class-color: rgba(200, 0, 255, 0.4); }

/* Button close */
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
