:root {
    --primary-color: #00e676; /* Vibrant Green */
    --secondary-color: #2979ff; /* Vibrant Blue */
    --background-dark: #121212;
    --surface-dark: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --spacing-unit: 1rem;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--background-dark);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

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

a:hover {
    color: var(--secondary-color);
}

/* Layout */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* Header */
header {
    background-color: var(--surface-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--surface-dark);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem 0;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.footer-col h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* UI Elements */
button {
    background-color: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #00c853;
}

input, select {
    background-color: var(--background-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem;
    border-radius: 4px;
    width: 100%;
    font-size: 1rem;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--surface-dark);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Utilities */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Mobile Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: space-around;
    }
    
    .calculator-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Calculator Styles */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 4rem; /* Space for sticky footer */
}

.trade-side {
    background-color: var(--surface-dark);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.search-container {
    position: relative;
    margin-bottom: 1rem;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--surface-dark);
    border: 1px solid var(--border-color);
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
    display: none;
}

.search-results.show {
    display: block;
}

.result-item {
    padding: 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
}

.result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.assets-list {
    min-height: 100px;
    margin-bottom: 1rem;
}

.asset-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-dark);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
}

.asset-remove {
    color: #ff5252;
    cursor: pointer;
    font-weight: bold;
    margin-left: 1rem;
}

.side-total {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: right;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

/* Sticky Result Bar (Mobile Default) */
.result-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--surface-dark);
    border-top: 1px solid var(--primary-color);
    padding: 1rem;
    text-align: center;
    z-index: 90;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.5);
}

/* Adjust footer margin to not be hidden by result bar on mobile */
body {
    padding-bottom: 80px; 
}

/* Desktop: Un-stick the bar */
@media (min-width: 769px) {
    body {
        padding-bottom: 0;
    }

    .result-bar {
        position: static;
        width: 100%;
        margin-top: 2rem;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: none;
        background-color: var(--surface-dark);
    }
}

.verdict-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

/* Analyzer Styles */
.step-box {
    background-color: var(--surface-dark);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.step-box label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.rosters-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.roster-card {
    background-color: var(--background-dark);
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.roster-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.roster-values {
    text-align: right;
}

.total-value {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.1rem;
}

.starters-value {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Player Profile Styles */
.player-profile-container {
    max-width: 800px !important;
    padding-top: 2rem;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.player-image-wrapper img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    background: #000;
}

.player-info-header h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
}

.value-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

.value-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.primary-card .value-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.secondary-card .value-number {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

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

.bio-item {
    background: var(--surface-dark);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.bio-item .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.bio-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 0.2rem;
}

.btn-trade {
    display: inline-block;
    background: var(--primary-color);
    color: #000;
    padding: 1rem 3rem;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.btn-trade:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .player-info-header h1 {
        font-size: 2rem;
    }
    .value-cards-grid {
        grid-template-columns: 1fr;
    }
}