:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-primary: #3b82f6;
    --accent-hover: #2563eb;
    --accent-glow: rgba(59, 130, 246, 0.5);
    
    --orb-1: #3b82f6;
    --orb-2: #8b5cf6;
    --orb-3: #10b981;
}

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

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

/* Dynamic Background Orbs */
.background-orbs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.orb {
    position: absolute;
    border-radius: 50%;
    opacity: 0.4;
    animation: float 20s infinite alternate ease-in-out;
}

.orb-1 {
    top: 10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: var(--orb-1);
    animation-delay: 0s;
}

.orb-2 {
    bottom: 20%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: var(--orb-2);
    animation-delay: -5s;
}

.orb-3 {
    top: 40%;
    left: 60%;
    width: 300px;
    height: 300px;
    background: var(--orb-3);
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, -50px) scale(1.2); }
}

/* Glassmorphism Container */
.container {
    width: 90%;
    max-width: 800px;
    padding: 40px;
    border-radius: 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
    animation: fadeIn 0.8s ease-out;
}

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

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

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

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Input Section */
.input-section {
    margin-bottom: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

.input-wrapper {
    display: flex;
    gap: 15px;
    position: relative;
}

input {
    flex: 1;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: 'Inter', monospace;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.primary-btn {
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--accent-glow);
}

.primary-btn:active {
    transform: translateY(0);
}

.error-msg {
    color: #ef4444;
    margin-top: 8px;
    font-size: 0.9rem;
    min-height: 20px;
}

/* Results Section */
.results-section {
    transition: all 0.5s ease;
}

.results-section.hidden {
    display: none;
    opacity: 0;
}

.result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.result-card:hover {
    transform: translateY(-5px);
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.2);
}

.result-card.full-width {
    grid-column: 1 / -1;
}

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

.value {
    font-size: 1.25rem;
    font-weight: 500;
    font-family: 'Inter', monospace;
}

.value.highlight {
    color: var(--accent-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.binary {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-family: 'Inter', monospace;
    opacity: 0.7;
    margin-top: 4px;
}

/* Info Section */
.info-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.info-section h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    .input-wrapper {
        flex-direction: column;
    }
    
    .primary-btn {
        padding: 16px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
}
