*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --dark-blue: #0a0a23;
    --darker-blue: #060618;
    --light-blue: #1b1b32;
    --accent: #f1be32;
    --accent-hover: #f8d36c;
    --text-light: #f5f6f7;
    --text-muted: #b5b7c8;
    --card-bg: #16162a;
    --success: #4ade80;
    --border-radius: 12px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    background: var(--dark-blue);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 3rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-accent {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

.converter-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #2a2a4a;
    box-shadow: var(--shadow);
}

.input-group {
    margin-bottom: 2rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.number-input {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1.1rem;
    border: 2px solid #2a2a4a;
    border-radius: 8px;
    background: var(--light-blue);
    color: var(--text-light);
    transition: all 0.3s ease;
}

.number-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(241, 190, 50, 0.1);
}

.number-input::placeholder {
    color: var(--text-muted);
}

.convert-btn {
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: var(--dark-blue);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.convert-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(241, 190, 50, 0.3);
}

.convert-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-weight: bold;
}

.result-section {
    margin-top: 1.5rem;
}

.result-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
}

.result-display {
    background: var(--light-blue);
    border: 2px solid #2a2a4a;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--success);
    transition: all 0.3s ease;
}

.result-display .placeholder {
    color: var(--text-muted);
    font-style: italic;
    font-weight: normal;
    font-size: 1rem;
}

.animation-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid #2a2a4a;
    box-shadow: var(--shadow);
    height: fit-content;
}

.section-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.section-header h2 {
    margin: 0;
    color: var(--text-light);
    font-size: 1.5rem;
}

.info-badge {
    background: var(--gradient);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.animation-window {
    background: var(--darker-blue);
    border: 2px dashed #2a2a4a;
    border-radius: 8px;
    padding: 1.5rem;
    min-height: 400px;
    display: flex;
    flex-direction: column-reverse;
    gap: 1rem;
    transition: all 0.3s ease;
}

.animation-placeholder {
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
    margin: auto;
}

.animation-frame {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animation-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive improvements */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .title {
        font-size: 2rem;
    }

    .converter-card,
    .animation-section {
        padding: 1.5rem;
    }

    .input-wrapper {
        flex-direction: column;
    }

    .convert-btn {
        justify-content: center;
    }
}