:root {
    --bg-dark: #0f172a;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --primary: #3b82f6; /* Blue for water/sonar */
    --primary-glow: rgba(59, 130, 246, 0.5);
    --accent-rock: #10b981; /* Green for safe/rock */
    --accent-mine: #ef4444; /* Red for danger/mine */
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
}

.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -100px;
    left: -100px;
    animation: float 10s infinite ease-in-out;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6; /* Purple accent */
    bottom: -50px;
    right: -50px;
    animation: float 12s infinite ease-in-out reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, 20px); }
}

.container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.05em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

textarea {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    color: var(--text-main);
    font-family: 'Outfit', monospace; /* Monospace for numbers looks better */
    font-size: 0.9rem;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.controls {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn {
    padding: 12px 24px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.btn.primary {
    background: var(--primary);
    color: white;
    flex-grow: 1; /* Make analyze button prominent */
    box-shadow: 0 4px 14px 0 var(--primary-glow);
}

.btn.primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn.text-only {
    background: transparent;
    color: var(--text-muted);
    padding: 12px;
}

.btn.text-only:hover {
    color: var(--text-main);
}

.result-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.3s ease;
}

.result-section.hidden {
    display: none;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 1s linear infinite;
}

.hidden {
    display: none !important;
}

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

.badge {
    display: inline-block;
    padding: 8px 32px;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.badge.rock {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-rock);
    border: 1px solid rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.badge.mine {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-mine);
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.2);
}

.confidence-meter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--text-muted);
}

.bar-container {
    width: 200px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

footer {
    text-align: center;
    margin-top: 40px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.6;
}
