/* Tools Page Styling - Calculator & Optimizer */
:root {
    --bg-primary: #0d0d0d;
    --bg-secondary: #1a1a1a;
    --bg-card: #0d1829;
    --bg-card-hover: #112035;
    --text-primary: #ffffff;
    --text-secondary: rgba(255,255,255,0.7);
    --text-muted: rgba(255,255,255,0.5);
    --accent-blue: #4a9eff;
    --accent-orange: #d4a050;
    --accent-primary: #00b4ff;
    --border-color: rgba(255,255,255,0.15);
    --rarity-common: #9ca3af;
    --rarity-uncommon: #22c55e;
    --rarity-rare: #3b82f6;
    --rarity-epic: #a855f7;
    --rarity-legendary: #fbbf24;
    --rarity-mythical: #c084fc;
    --rarity-divine: #ff6b9d;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: #0a0a0a;
    background-image: url('/banner-background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: inherit;
    background-attachment: fixed;
    filter: blur(8px);
    z-index: -2;
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: -1;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 14px 24px;
    background-image: url('/banner-background.png');
    background-size: cover;
    background-position: center;
}
.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20,35,50,0.9) 0%, rgba(40,50,60,0.7) 40%, rgba(120,40,40,0.8) 80%, rgba(140,30,30,0.9) 100%);
    pointer-events: none;
}
.site-header > * { position: relative; z-index: 1; }
.site-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.site-title img { width: 32px; height: 32px; }
.header-nav { display: flex; gap: 24px; }
.header-nav a {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.header-nav a:hover { color: #fff; }

/* Search */
.search-container { position: relative; max-width: 300px; }
.search-box {
    display: flex;
    align-items: center;
    background: #3c3c3c;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 6px 12px;
}
.search-icon { width: 16px; height: 16px; color: rgba(255,255,255,0.6); }
.search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}
.search-input::placeholder { color: rgba(255,255,255,0.5); }
.search-shortcut {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.1);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}
.search-results {
    position: absolute;
    top: calc(100% + 12px);
    left: -8px;
    right: -8px;
    background-color: #1a1a1a;
    background-image: url('/wavy background.png');
    background-size: 400px auto;
    border: 1px solid rgba(255,255,255,0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1001;
}
.search-results.active { display: block; }

/* Breadcrumb */
.breadcrumb-nav { padding-top: 80px; background: transparent; border: none; }
.breadcrumb-container { max-width: 1600px; margin: 0 auto; padding: 16px 24px; }
.breadcrumb-list { display: flex; gap: 8px; list-style: none; font-size: 0.85rem; }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item::after { content: '›'; margin-left: 8px; color: var(--text-muted); }
.breadcrumb-item:last-child::after { display: none; }

/* Footer */
.site-footer { background: #0a0a0a; border-top: 1px solid var(--border-color); padding: 40px 0 30px; margin-top: 60px; }
.footer-content { max-width: 1200px; margin: 0 auto; padding: 0 40px; display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-section { display: flex; flex-direction: column; gap: 16px; }
.footer-section-title { font-family: 'Chakra Petch', sans-serif; font-size: 0.8rem; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 2px; }
.footer-buttons { display: flex; gap: 8px; background: rgba(30,30,30,0.6); border: 1px solid var(--border-color); padding: 12px; position: relative; }
.footer-btn {
    display: inline-block;
    padding: 10px 16px;
    background-color: #2a2a2a;
    background-image: url('/wavy background.png');
    background-size: 200px auto;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.8rem;
}
.footer-btn:hover { background-color: #3a3a3a; color: #fff; text-decoration: none; }
.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 20px 40px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.footer-logo img { width: 28px; height: 28px; }
.footer-logo span { font-family: 'Chakra Petch', sans-serif; font-size: 0.9rem; color: rgba(255,255,255,0.7); }
.footer-copyright { font-size: 0.75rem; color: rgba(255,255,255,0.4); text-align: center; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 0.75rem; color: rgba(255,255,255,0.5); }

/* Corner brackets */
.corner-tl, .corner-tr, .corner-bl, .corner-br {
    position: absolute;
    width: 16px;
    height: 16px;
    border-style: solid;
    border-width: 0;
    border-color: rgba(255,255,255,0.5);
}
.corner-tl { top: -4px; left: -4px; border-top-width: 2px; border-left-width: 2px; }
.corner-tr { top: -4px; right: -4px; border-top-width: 2px; border-right-width: 2px; }
.corner-bl { bottom: -4px; left: -4px; border-bottom-width: 2px; border-left-width: 2px; }
.corner-br { bottom: -4px; right: -4px; border-bottom-width: 2px; border-right-width: 2px; }

/* Hide old background animations */
.bg-animation, .bg-grid { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
    .header-nav { display: none; }
    .breadcrumb-container { padding: 16px 20px; }
    .footer-content { flex-direction: column; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
