:root {
    --bg-color: #050505;
    --text-color: #ffffff;
    --accent-color: #3b82f6;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --secondary-bg: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.1);
    --card-bg: rgba(15, 15, 15, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --shimmer-grad: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 2vh;
    /* Even closer to top */
    overflow-x: hidden;
}

/* Background Effects */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    filter: blur(100px);
}

.blob {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    opacity: 0.5;
    /* Even brighter */
    filter: brightness(1.3);
}

.blob-1 {
    background: radial-gradient(circle, #4f46e5 0%, transparent 70%);
    top: -20%;
    left: -15%;
    animation: move 15s infinite alternate;
}

.blob-2 {
    background: radial-gradient(circle, #9333ea 0%, transparent 70%);
    bottom: -20%;
    right: -15%;
    animation: move 20s infinite alternate-reverse;
}

.blob-3 {
    background: radial-gradient(circle, #1e40af 0%, transparent 70%);
    top: 30%;
    right: -10%;
    animation: move 18s infinite alternate;
}

.blob-4 {
    background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
    bottom: 20%;
    left: -10%;
    animation: move 22s infinite alternate-reverse;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }

    to {
        transform: translate(100px, 100px);
    }
}

/* Container & Transitions */
.container {
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    z-index: 1;
}

.step {
    display: none;
    opacity: 0;
    transition: all 0.4s ease-out;
    /* Sharper transition */
}

.step.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Explicit top alignment within step */
    width: 100%;
    opacity: 1;
}

/* Typography */
h1 {
    font-size: 3.5rem;
    font-weight: 600;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #fff, #999);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 300;
}

.title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Buttons */
.action-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.btn {
    border: none;
    border-radius: 12px;
    padding: 1.2rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: #fff;
    color: #000;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: var(--secondary-bg);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-error {
    background: rgba(220, 38, 38, 0.2);
    color: #ff8a8a;
    border: 1px solid rgba(220, 38, 38, 0.3);
    backdrop-filter: blur(10px);
}

.btn-error:hover {
    background: rgba(220, 38, 38, 0.3);
    transform: scale(1.02);
}

.btn.small {
    padding: 0.8rem 1.5rem;
}

.btn.full {
    width: 100%;
}

/* Input Card */
.input-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2rem;
    width: 100%;
    backdrop-filter: blur(10px);
}

.input-field {
    margin-bottom: 1.5rem;
}

.input-field label {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
}

.input-field input,
.input-field textarea {
    width: 100%;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.input-field input:focus,
.input-field textarea:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

.input-field textarea {
    height: 100px;
    resize: none;
}

/* Simulation */
.simulation-container {
    text-align: center;
    width: 100%;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid #fff;
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.progress-bar-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: #fff;
    transition: width 0.1s linear;
}

#sim-details {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Summary Card */
.summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 1.5rem;
    width: 100%;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: rgba(255, 255, 255, 0.4);
}

.summary-item .value {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: monospace;
}

.summary-item .value.minimized {
    filter: blur(4px);
    transition: filter 0.3s ease;
}

.summary-item .value:hover {
    filter: blur(0);
}

/* Shimmer Animation */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--shimmer-grad);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Error Card */
.error-card {
    background: rgba(40, 0, 0, 0.6);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 50px rgba(220, 38, 38, 0.1);
}

.error-icon {
    width: 60px;
    height: 60px;
    background: rgba(220, 38, 38, 0.2);
    color: #ef4444;
    font-size: 2rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    border: 1px solid rgba(220, 38, 38, 0.4);
}

.error-title {
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-text {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 2rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}