:root {
    --bg-color: #050505;
    --text-main: #ffffff;
    --text-muted: #8892b0;
    --panel-bg: rgba(20, 22, 30, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);

    --color-kill: #00ff88;
    --color-death: #ff3366;
    --color-assist: #00e5ff;

    --tier-terrible: #ff3366;
    --tier-bad: #ff9933;
    --tier-average: #f1c40f;
    --tier-good: #00e5ff;
    --tier-excellent: #00ff88;
    --tier-godlike: #b800ff;

    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--color-kill);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--tier-godlike);
    bottom: -150px;
    left: -150px;
    animation-delay: -5s;
}

.noise-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 50px) scale(1.1);
    }

    100% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Main Layout */
.app-container {
    width: 100%;
    max-width: 600px;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.app-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.app-header h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.app-header h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-muted);
}

.app-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Glass Panel */
.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

/* Inputs */
.inputs-wrapper {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
}

.input-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-box label {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kill-box label {
    color: var(--color-kill);
}

.death-box label {
    color: var(--color-death);
}

.assist-box label {
    color: var(--color-assist);
}

.input-box input {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem;
    color: var(--text-main);
    font-size: 1.5rem;
    font-weight: 600;
    font-family: var(--font-body);
    text-align: center;
    transition: all 0.3s ease;
    outline: none;
}

.input-box input:focus {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
}

.kill-box input:focus {
    border-color: var(--color-kill);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.death-box input:focus {
    border-color: var(--color-death);
    box-shadow: 0 0 15px rgba(255, 51, 102, 0.2);
}

.assist-box input:focus {
    border-color: var(--color-assist);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

/* Remove number arrows */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Divider */
.divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    margin: 2.5rem 0;
}

/* Results Section */
.results-wrapper {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.result-circle {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring__circle {
    transition: stroke-dashoffset 0.5s ease-in-out, stroke 0.3s ease;
    transform-origin: 50% 50%;
}

.kda-value-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.score-value {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text-main);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transition: color 0.3s ease;
}

.score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 00;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.evaluation-panel {
    flex: 1;
}

.tier-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: linear-gradient(to right, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.tier-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 600px) {
    .app-header h1 {
        font-size: 2.5rem;
    }

    .inputs-wrapper {
        flex-direction: column;
    }

    .results-wrapper {
        flex-direction: column;
        text-align: center;
    }
}

/* Global Footer */
.global-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
    /* Let clicks pass through to background */
}

.global-footer a {
    pointer-events: auto;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.global-footer a:hover {
    color: var(--text-main);
    text-decoration: underline;
}

/* Top Navigation (Back Button) */
.top-nav {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 10;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}
