:root {
    --bg-body-start: #0a0a0f;
    --bg-body-end: #1a1a2e;
    --panel-bg: rgba(20, 24, 40, 0.85);
    --card-bg: #1e2235;
    --glass-base: rgba(255, 255, 255, 0.06);
    --glass-border: #333b55;
    --glass-hover: rgba(255, 255, 255, 0.10);
    --primary: #3b82f6;
    --primary-g-start: #3b82f6;
    --primary-g-end: #2563eb;
    --tech-blue: #60a5fa;
    --success: #10b981;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --text-muted: #8b9bb4;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --radius-btn: 100px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, var(--bg-body-start), var(--bg-body-end));
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
}

a {
    color: var(--tech-blue);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #93c5fd;
}

.app-container {
    width: 100%;
    max-width: 1000px;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.header small {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.intro-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    form {
        grid-template-columns: 1fr 1fr;
    }
}

.module {
    background: var(--glass-base);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: border-color 0.3s, transform 0.3s;
}

.module:hover {
    border-color: var(--glass-hover);
}

.module-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--glass-border);
    color: var(--tech-blue);
    font-weight: 600;
    font-size: 1rem;
}

.module-header svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

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

.input-group {
    margin-bottom: 1rem;
}

.input-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-select,
.form-control {
    width: 100%;
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-select:hover,
.form-control:hover {
    border-color: #4b5563;
}

.form-select:focus,
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(10, 10, 15, 0.6);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1.1em;
}

.helper-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

.action-area {
    text-align: center;
    margin-top: 0.5rem;
    padding-top: 1rem;
    grid-column: 1 / -1;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-g-start), var(--primary-g-end));
    color: #fff;
    border: none;
    padding: 0.9rem 3rem;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
    filter: brightness(1.1);
}

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

#results {
    background: var(--card-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 2rem;
    grid-column: 1 / -1;
    position: relative;
    overflow: hidden;
    display: block;
}

#results h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.result-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
}

.result-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    word-break: break-all;
    overflow-wrap: anywhere;
}

.result-item.highlight-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-item.highlight-box .result-value {
    color: var(--success);
    font-size: 1.75rem;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.source-text {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.7;
}

.promo-box {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.footer-bar {
    margin-top: 3rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: inline-block;
    vertical-align: middle;
}

#results h4 .icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
}
