:root {
    --bg-color: #0f172a;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --row-hover: rgba(255, 255, 255, 0.05);
    
    /* Zmienne dla trendu % */
    --trend-up: #10b981;
    --trend-down: #ef4444;
    --trend-neutral: #64748b;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Background Decorations */
.background-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: drift 20s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59,130,246,0.3) 0%, rgba(30,58,138,0) 70%);
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, rgba(76,29,149,0) 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(16,185,129,0.15) 0%, rgba(6,78,59,0) 70%);
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

/* Main Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 0.8s ease-out;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Table Glassmorphism Container */
.table-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2px; /* For subtle border effect */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow-x: auto;
    margin-bottom: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th, td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    white-space: nowrap;
}

th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    padding-top: 1.5rem;
}

th:not(:first-child), td:not(:first-child) {
    text-align: right;
}

tbody tr {
    transition: background-color 0.2s ease, transform 0.2s ease;
}

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

tbody tr:hover {
    background-color: var(--row-hover);
}

.bond-name {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bond-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    letter-spacing: 0.05em;
}

.rate-cell {
    font-variant-numeric: tabular-nums;
    font-size: 1.1rem;
    font-weight: 500;
}

.rate-trend {
    font-size: 0.8rem;
    margin-left: 0.25rem;
    font-weight: 600;
}

/* Cell-level highlighting */
.cell-trend-up {
    background-color: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.cell-trend-down {
    background-color: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.cell-empty {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

/* Info Card */
.info-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.info-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.info-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.info-card code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    color: #93c5fd;
    font-family: monospace;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out backwards;
}

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

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 2rem 1rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    th, td {
        padding: 1rem;
    }
}

/* Margin and period styles */
.rate-label {
    font-size: 0.70rem;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-rate-wrapper {
    margin-bottom: 6px;
}

.margin-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
    padding: 3px 6px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.cell-trend-up .rate-label, .cell-trend-down .rate-label {
    color: inherit;
    opacity: 0.6;
}

.cell-trend-up .margin-info, .cell-trend-down .margin-info {
    color: inherit;
    opacity: 0.9;
    background: rgba(0, 0, 0, 0.1);
    border-color: transparent;
}

/* Margin-specific colored trends (overriding any cell background behavior) */
body table .cell-trend-up .margin-info.trend-up,
body table .cell-trend-down .margin-info.trend-up,
body table .margin-info.trend-up {
    background: rgba(16, 185, 129, 0.25);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

body table .cell-trend-up .margin-info.trend-down,
body table .cell-trend-down .margin-info.trend-down,
body table .margin-info.trend-down {
    background: rgba(239, 68, 68, 0.25);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.2);
}
