/* TradeBooster Dark Theme */
* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background: #0f0f23;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    color: #fff;
}

h1:focus {
    outline: none;
}

a {
    color: #00d4ff;
    text-decoration: none;
}

a:hover {
    color: #00b8e6;
}

/* Buttons */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #00d4ff;
    color: #000;
}

.btn-primary:hover {
    background: #00b8e6;
}

.btn-success {
    background: #00ff88;
    color: #000;
}

.btn-warning {
    background: #ffaa00;
    color: #000;
}

.btn-danger {
    background: #ff4444;
    color: #fff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #333;
    border-radius: 4px;
    background: #1a1a2e;
    color: #fff;
}

.form-control:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.2);
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #00ff88;
}

.invalid {
    outline: 1px solid #ff4444;
}

.validation-message {
    color: #ff4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
}

/* Blazor Error UI */
#blazor-error-ui {
    background: #1a1a2e;
    border-top: 2px solid #ff4444;
    bottom: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    display: none;
    left: 0;
    padding: 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: #ff4444;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    color: #888;
}

.blazor-error-boundary {
    background: #2a1a1a;
    border: 1px solid #ff4444;
    padding: 1rem;
    border-radius: 4px;
    color: #ff4444;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* Loading Progress */
.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

.loading-progress circle {
    fill: none;
    stroke: #333;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #00d4ff;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    color: #fff;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

/* Utility Classes */
.positive { color: #00ff88; }
.negative { color: #ff4444; }
.text-muted { color: #888; }
