:root {
    --bg-dark: #07090f;
    --glass-bg: rgba(16, 20, 32, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f0f4f8;
    --text-muted: #8b9bb4;
    --accent-primary: #00e5ff;
    --accent-primary-glow: rgba(0, 229, 255, 0.4);
    --accent-secondary: #7000ff;
    --positive: #00ff88;
    --danger: #ff3366;
    
    --font-sans: 'Inter', sans-serif;
    --font-display: 'Space Grotesk', sans-serif;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Effects */
.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('ark.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

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

.logo {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

.logo span {
    color: var(--accent-primary);
}

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

/* Glassmorphism utility */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.appraisal-panel {
    padding: 30px;
    margin-bottom: 40px;
}

.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

select, textarea {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus, textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--accent-primary-glow);
}

textarea {
    width: 100%;
    min-height: 250px;
    resize: vertical;
    font-family: monospace;
    line-height: 1.5;
}

.input-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.primary-btn {
    background: rgba(0, 229, 255, 0.05);
    color: var(--accent-primary);
    border: 1px solid rgba(0, 229, 255, 0.3);
    padding: 16px 32px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    align-self: flex-end;
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.primary-btn:hover {
    transform: translateY(-2px);
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--accent-primary);
    box-shadow: 0 10px 20px -10px var(--accent-primary-glow), 0 0 15px rgba(0, 229, 255, 0.2);
    color: #fff;
}

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

.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--accent-primary);
    animation: spin 1s linear infinite;
}

.warning-banner {
    background-color: rgba(255, 170, 0, 0.15);
    border-left: 4px solid #ffaa00;
    color: #ffcc66;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.primary-btn.loading .spinner {
    display: block;
}

.primary-btn.loading span {
    display: none;
}

/* Results */
.hidden {
    display: none !important;
}

.results-panel {
    padding: 30px;
    animation: slideUp 0.5s ease forwards;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.total-value .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.isk-value {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(to right, #ffffff, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.appraisal-meta {
    display: flex;
    gap: 20px;
    color: var(--text-muted);
    font-weight: 600;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 600;
}

th.right, td.right {
    text-align: right;
}

td {
    font-variant-numeric: tabular-nums;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.item-name {
    font-weight: 600;
    color: var(--accent-primary);
}

/* Share link styles */
.share-link-container {
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
}

#share-link-input {
    background: transparent;
    border: none;
    color: var(--accent-primary);
    font-family: monospace;
    width: 250px;
    outline: none;
    user-select: all;
    font-size: 0.9rem;
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.login-btn {
    display: inline-block;
    padding: 10px 20px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 15px var(--accent-primary-glow);
}

/* Responsive */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
    }
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .isk-value {
        font-size: 2.2rem;
    }
}
