:root {
    --bg-dark: #0a0b10;
    --bg-panel: #151720;
    --bg-input: #1f2230;
    --primary-gold: #d4af37;
    --primary-gold-hover: #f5cc45;
    --accent-blue: #3b82f6;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: #2d3748;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Roboto', sans-serif;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.main-header {
    background-color: rgba(10, 11, 16, 0.95);
    border-bottom: 1px solid var(--primary-gold);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.site-logo {
    height: 40px;
    width: auto;
}

.logo-container h1 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo-container:hover h1 {
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-item {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.nav-item:hover,
.nav-item.active {
    color: var(--primary-gold);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Content */
.content-area {
    flex: 1;
    padding: 2rem;
    max-width: 1700px;
    margin: 0 auto;
    width: 100%;
}

/* Hero Banner */
.hero-section {
    height: 400px;
    background-image: url('assets/banner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--bg-dark);
    position: relative;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(10, 11, 16, 0.9) 100%);
    pointer-events: none;
}

.profession-banner {
    height: 180px;
    background-image: url('assets/banner.png');
    background-size: cover;
    background-position: center 30%;
    background-color: var(--bg-dark);
    position: relative;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid var(--primary-gold);
}

.welcome-message {
    text-align: center;
    margin-top: 3rem;
    color: var(--text-muted);
}

.profession-title {
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.control-panel h3 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.control-group-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.control-card {
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
}

.control-card h4 {
    color: var(--primary-gold);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-heading);
}

.input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.input-row:last-child {
    margin-bottom: 0;
}

.input-row label {
    color: var(--text-muted);
    font-size: 0.9rem;
    min-width: 100px;
}

.input-row input,
.input-row select {
    flex: 1;
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 4px;
    font-family: inherit;
}

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

/* Recipe Cards */
.recipe-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.recipe-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.recipe-header h3 {
    color: var(--primary-gold);
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

/* Chain Calculator */
.chain-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.tier-node {
    background: linear-gradient(145deg, var(--bg-panel), var(--bg-dark));
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.tier-node:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.6);
}

.tier-node.active {
    border-color: var(--primary-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.25);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.08), var(--bg-dark));
}

.tier-name {
    font-weight: 700;
    color: var(--primary-gold);
    font-size: 0.95rem;
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.tier-input-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-input {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    border: 2px solid var(--border-color);
    color: var(--primary-gold);
    padding: 0.6rem;
    border-radius: 6px;
    width: 100%;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    transition: all 0.3s;
}

.tier-input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.tier-result {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-blue);
    text-align: center;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
    padding: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.tier-remainder {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

.tier-xp {
    font-size: 0.85rem;
    color: #4ade80;
    font-weight: bold;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(74, 222, 128, 0.2);
    padding-top: 0.5rem;
    text-align: center;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

.arrow-separator {
    color: var(--primary-gold);
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Material Grid */
.material-section {
    margin-bottom: 2rem;
}

.material-section h3 {
    color: var(--primary-gold);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.material-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.material-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-gold);
}

.material-item label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: capitalize;
}

.material-item input {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 4px;
    width: 100%;
}

.material-item input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.result-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-card.active {
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.result-card h5 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.craft-count {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.craft-xp {
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: bold;
}

/* Group Sections */
.group-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(21, 23, 32, 0.5);
}

.group-header {
    background-color: var(--bg-panel);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}

.group-header:hover {
    background-color: var(--bg-input);
}

.group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.group-section.active .group-content {
    max-height: 10000px;
    padding: 1rem;
}

/* Footer */
.main-footer {
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

/* Gathering Calculator Styles */
.total-profit-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.total-profit-container h3 {
    color: #d4af37;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.total-profit-container .total-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.calc-category-section {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-top-width: 4px;
    /* Colored top border */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}


.arrow-separator {
    color: var(--primary-gold);
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Material Grid */
.material-section {
    margin-bottom: 2rem;
}

.material-section h3 {
    color: var(--primary-gold);
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

.material-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.material-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.material-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border-color: var(--primary-gold);
}

.material-item label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: capitalize;
}

.material-item input {
    background-color: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 0.5rem;
    border-radius: 4px;
    width: 100%;
}

.material-item input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

/* Results Grid */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.result-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.result-card.active {
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.1);
}

.result-card h5 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.craft-count {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.craft-xp {
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: bold;
}

/* Group Sections */
.group-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(21, 23, 32, 0.5);
}

.group-header {
    background-color: var(--bg-panel);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}

.group-header:hover {
    background-color: var(--bg-input);
}

.group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.group-section.active .group-content {
    max-height: 10000px;
    padding: 1rem;
}

/* Footer */
.main-footer {
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

/* Gathering Calculator Styles */
.total-profit-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.total-profit-container h3 {
    color: #d4af37;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.total-profit-container .total-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.calc-category-section {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-top-width: 4px;
    /* Colored top border */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.calc-category-section h4 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.calc-items-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns for inputs */
    grid-template-areas:
        "name name"
        "input1 input2"
        "profit profit";
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-item-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

.calc-name {
    grid-area: name;
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.calc-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 8px;
    color: #fff;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}

/* Specific targeting for inputs if possible, otherwise they flow naturally */
.calc-item-row input:nth-of-type(1) {
    grid-area: input1;
}

.calc-item-row input:nth-of-type(2) {
    grid-area: input2;
}

.calc-input:focus {
    border-color: #d4af37;
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

.calc-profit {
    grid-area: profit;
    font-weight: bold;
    color: #d4af37;
    text-align: right;
    font-size: 1rem;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments for calculator */

.result-card h5 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.craft-count {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--accent-blue);
}

.craft-xp {
    font-size: 0.9rem;
    color: #4ade80;
    font-weight: bold;
}

/* Group Sections */
.group-section {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(21, 23, 32, 0.5);
}

.group-header {
    background-color: var(--bg-panel);
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background-color 0.2s;
}

.group-header:hover {
    background-color: var(--bg-input);
}

.group-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.group-section.active .group-content {
    max-height: 10000px;
    padding: 1rem;
}

/* Footer */
.main-footer {
    background-color: var(--bg-panel);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    margin-top: auto;
}

/* Gathering Calculator Styles */
.total-profit-container {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.total-profit-container h3 {
    color: #d4af37;
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.total-profit-container .total-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.calc-category-section {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-top-width: 4px;
    /* Colored top border */
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.calc-category-section h4 {
    margin: 0 0 15px 0;
    text-align: center;
    font-size: 1.1rem;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.calc-items-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calc-item-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Two columns for inputs */
    grid-template-areas:
        "name name"
        "input1 input2"
        "profit profit";
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    transition: background 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-item-row:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(212, 175, 55, 0.3);
}

.calc-name {
    grid-area: name;
    font-size: 0.95rem;
    color: #e2e8f0;
    font-weight: 500;
    margin-bottom: 4px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 4px;
}

.calc-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 8px;
    color: #fff;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}

/* Specific targeting for inputs if possible, otherwise they flow naturally */
.calc-item-row input:nth-of-type(1) {
    grid-area: input1;
}

.calc-item-row input:nth-of-type(2) {
    grid-area: input2;
}

.calc-input:focus {
    border-color: #d4af37;
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

.calc-profit {
    grid-area: profit;
    font-weight: bold;
    color: #d4af37;
    text-align: right;
    font-size: 1rem;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments for calculator */
@media (max-width: 600px) {
    .calc-item-row {
        gap: 6px;
    }

    .calc-profit {
        text-align: center;
        color: #4ade80;
    }
}

/* Target Calculator Styles */
.target-calc-layout {
    margin-top: 20px;
}

.target-group {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.target-group h3 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.target-select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #475569;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
}

.target-select:focus {
    border-color: #d4af37;
    outline: none;
}

.target-result-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.target-result-card h3 {
    color: #d4af37;
    margin-top: 0;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.target-summary {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.target-summary p {
    margin: 5px 0;
    color: #cbd5e1;
}

.target-summary .xp-needed span,
.target-summary .crafts-count span {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.target-ingredients h4 {
    color: #94a3b8;
    margin-bottom: 10px;
}

.target-ing-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.target-ing-item:last-child {
    border-bottom: none;
}

.target-ing-item .ing-name {
    color: #e2e8f0;
    text-transform: capitalize;
}

.target-ing-item .ing-count {
    color: #d4af37;
    font-weight: bold;
}

.target-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    background: rgba(15, 23, 42, 0.4);
    border: 2px dashed #334155;
    border-radius: 8px;
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Highlighted Material Input */
.material-item.highlight input {
    border-color: #eab308 !important;
    color: #eab308 !important;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(234, 179, 8, 0.5);
}

.material-item.highlight label {
    color: #eab308 !important;
    font-weight: bold;
}

/* Selected Result Card */
.result-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.result-card.selected {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.1);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}



.calc-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #475569;
    border-radius: 4px;
    padding: 8px;
    color: #fff;
    font-size: 0.9rem;
    width: 100%;
    text-align: center;
}

/* Specific targeting for inputs if possible, otherwise they flow naturally */
.calc-item-row input:nth-of-type(1) {
    grid-area: input1;
}

.calc-item-row input:nth-of-type(2) {
    grid-area: input2;
}

.calc-input:focus {
    border-color: #d4af37;
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

.calc-profit {
    grid-area: profit;
    font-weight: bold;
    color: #d4af37;
    text-align: right;
    font-size: 1rem;
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments for calculator */
@media (max-width: 600px) {
    .calc-item-row {
        gap: 6px;
    }

    .calc-profit {
        text-align: center;
        color: #4ade80;
    }
}

/* Target Calculator Styles */
.target-calc-layout {
    margin-top: 20px;
}

.target-group {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.target-group h3 {
    color: #d4af37;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 5px;
}

.target-select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #475569;
    color: #fff;
    border-radius: 4px;
    font-size: 1rem;
}

.target-select:focus {
    border-color: #d4af37;
    outline: none;
}

.target-result-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border: 1px solid #d4af37;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.target-result-card h3 {
    color: #d4af37;
    margin-top: 0;
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.target-summary {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.target-summary p {
    margin: 5px 0;
    color: #cbd5e1;
}

.target-summary .xp-needed span,
.target-summary .crafts-count span {
    color: #fff;
    font-weight: bold;
    font-size: 1.1rem;
}

.target-ingredients h4 {
    color: #94a3b8;
    margin-bottom: 10px;
}

.target-ing-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.target-ing-item:last-child {
    border-bottom: none;
}

.target-ing-item .ing-name {
    color: #e2e8f0;
    text-transform: capitalize;
}

.target-ing-item .ing-count {
    color: #d4af37;
    font-weight: bold;
}

.target-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 200px;
    background: rgba(15, 23, 42, 0.4);
    border: 2px dashed #334155;
    border-radius: 8px;
    color: #64748b;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* Highlighted Material Input */
.material-item.highlight input {
    border-color: #eab308 !important;
    color: #eab308 !important;
    font-weight: bold;
    box-shadow: 0 0 5px rgba(234, 179, 8, 0.5);
}

.material-item.highlight label {
    color: #eab308 !important;
    font-weight: bold;
}

/* Selected Result Card */
.result-card {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.result-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
}

.result-card.selected {
    border-color: #eab308;
    background: rgba(234, 179, 8, 0.1);
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.2);
}

.result-card.selected h5 {
    color: #eab308;
}


/* =========================================
   MOBILE ONLY VIEW (< 768px)
   ========================================= */
@media screen and (max-width: 768px) {

    /* Hide Desktop Nav and other elements AGGRESSIVELY */
    /* Hide Hero Section AGGRESSIVELY */
    .hero-section {
        display: none !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        top: -9999px !important;
        left: -9999px !important;
    }
    /* Show Header but adjust layout */
    .main-header {
        display: flex !important;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 0.5rem 1rem;
        height: auto !important;
        min-height: 50px;
        position: relative !important;
        z-index: 1001;
        gap: 10px;
    }

    /* Make main-nav scrollable horizontally on mobile */
    .main-nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 1rem;
    }
    .main-nav::-webkit-scrollbar {
        display: none;
    }
    .nav-item {
        white-space: nowrap;
        font-size: 0.9rem;
    }
    #mobile-profession-selector {
        display: none !important;
    }
    #mobile-prof-select {
        display: none !important;
    }

    .logo-container h1 {
        font-size: 1rem;
        /* Smaller text */
    }

    .site-logo {
        width: 32px;
        height: 32px;
    }

    /* Show Footer */
    .main-footer {
        display: block !important;
        font-size: 0.8rem;
        padding: 1rem;
    }

    /* Adjust Content Area */
    .content-area {
        padding: 0.5rem;
        margin-top: 0;
        position: relative;
        z-index: 1000;
    }

    /* Ensure Calculator fits */
    .control-group-container {
        grid-template-columns: 1fr;
    }

    .input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .input-row label {
        margin-bottom: 0.25rem;
    }

    /* Target Calculator Mobile Adjustments */
    .target-calc-layout {
        flex-direction: column;
    }

    .target-selection-col {
        min-width: 100%;
    }
}

/* --- Character Builder (Eşya Deneme) Styles --- */

.builder-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 20px;
}

/* Base Stats Panel */
.builder-stats-panel {
    flex: 1;
    min-width: 300px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
}

.builder-stats-panel h3 {
    color: var(--primary-gold);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.builder-level-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.builder-level-group select {
    background-color: var(--bg-body);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 4px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--border-color);
}

.stat-name {
    flex: 1;
}

.stat-value {
    width: 40px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-gold);
}

.stat-controls button {
    background: var(--bg-body);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.2s;
}

.stat-controls button:hover:not(:disabled) {
    background: var(--primary-gold);
    color: #000;
}

.stat-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Paper Doll / Equipment Panel */
.builder-equip-panel {
    flex: 2;
    min-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('assets/inventory_bg.jpg') center/cover no-repeat;
    background-color: #1a1a1a;
    border: 1px solid #444;
    border-radius: 8px;
    position: relative;
    padding: 20px;
    min-height: 500px;
}

.paper-doll-container {
    display: grid;
    grid-template-columns: 60px 200px 60px;
    grid-template-rows: repeat(5, 60px);
    gap: 10px;
    justify-content: center;
}

.equip-slot {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid #555;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: relative;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.equip-slot:hover {
    border-color: var(--primary-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.equip-slot[data-item="true"] {
    border-color: #7b68ee; /* Rare item color example */
}

/* Slot positions in grid */
.slot-helmet { grid-column: 1; grid-row: 1; }
.slot-chest { grid-column: 1; grid-row: 2; }
.slot-pads { grid-column: 1; grid-row: 3; }
.slot-boots { grid-column: 1; grid-row: 4; }
.slot-gloves { grid-column: 1; grid-row: 5; }

.slot-earringL { grid-column: 3; grid-row: 1; }
.slot-earringR { grid-column: 4; grid-row: 1; } /* We adjusts grid later if needed */
.slot-ringL { grid-column: 3; grid-row: 4; }
.slot-ringR { grid-column: 4; grid-row: 4; }
.slot-pendant { grid-column: 3; grid-row: 2; }
.slot-belt { grid-column: 3; grid-row: 3; }

.slot-rightHand { position: absolute; bottom: 20px; left: 20px; width: 60px; height: 60px;}
.slot-leftHand { position: absolute; bottom: 20px; right: 20px; width: 60px; height: 60px; }
.slot-relic { position: absolute; bottom: 20px; right: 90px; width: 40px; height: 40px; }

/* Character Info Panel */
.builder-info-panel {
    flex: 1;
    min-width: 300px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 15px;
}

.builder-info-panel h3 {
    color: var(--primary-gold);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}

.info-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.info-label {
    color: var(--text-muted);
}

.info-value {
    font-weight: bold;
    color: #fff;
}

/* Modal for item selection */
.item-selection-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-panel);
    border: 2px solid var(--primary-gold);
    border-radius: 8px;
    padding: 20px;
    z-index: 2000;
    width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: none;
}
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1999;
    display: none;
}
/* ============================================== */
/* CHARACTER BUILDER - Rise Online Style          */
/* ============================================== */
.cb-wrapper { max-width: 1650px; margin: 0 auto; }
.cb-job-bar { display: flex; gap: 8px; justify-content: center; margin-bottom: 20px; flex-wrap: wrap; }
.cb-job-btn { padding: 10px 22px; border: 2px solid #333; background: linear-gradient(180deg, #1a1a2e 0%, #0d0d15 100%); color: #aaa; font-size: 0.95rem; font-weight: 600; cursor: pointer; border-radius: 8px; transition: all 0.3s ease; letter-spacing: 0.5px; }
.cb-job-btn:hover { border-color: var(--job-color, #888); color: #fff; background: linear-gradient(180deg, #252545 0%, #1a1a2e 100%); }
.cb-job-btn.active { border-color: var(--job-color, #d4a634); color: #fff; background: linear-gradient(180deg, #2a2a4a 0%, #16162a 100%); box-shadow: 0 0 12px var(--job-color, #d4a634), inset 0 0 20px rgba(0,0,0,0.5); }

.cb-main-grid { display: grid; grid-template-columns: 280px 1fr 300px; gap: 15px; }
@media (max-width: 900px) { .cb-main-grid { grid-template-columns: 1fr; } }

.cb-panel-header { font-size: 0.85rem; font-weight: 700; color: #d4a634; text-transform: uppercase; letter-spacing: 1.5px; padding: 8px 12px; background: linear-gradient(90deg, rgba(212,166,52,0.15) 0%, transparent 100%); border-left: 3px solid #d4a634; margin-bottom: 10px; border-radius: 0 4px 4px 0; }

/* Stats Panel */
.cb-stats-panel { background: linear-gradient(180deg, #12121e 0%, #0a0a14 100%); border: 1px solid #2a2a3e; border-radius: 10px; padding: 15px; }
.cb-level-row { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; padding: 8px; background: rgba(0,0,0,0.3); border-radius: 6px; }
.cb-level-row label { color: #aaa; font-size: 0.85rem; }
.cb-level-row select { flex: 1; padding: 6px; background: #1a1a2e; border: 1px solid #333; color: #fff; border-radius: 4px; font-size: 0.9rem; }

.cb-vitals { margin-bottom: 15px; display: flex; flex-direction: column; gap: 6px; }
.cb-hp-bar, .cb-mp-bar { position: relative; height: 24px; background: #1a1a2e; border-radius: 12px; border: 1px solid #333; overflow: hidden; display: flex; align-items: center; }
.cb-bar-label { position: absolute; left: 10px; font-size: 0.7rem; font-weight: 700; color: #fff; z-index: 2; text-shadow: 0 0 4px #000; }
.cb-bar-fill { position: absolute; left: 0; top: 0; height: 100%; border-radius: 12px; transition: width 0.5s ease; }
.hp-fill { width: 70%; background: linear-gradient(90deg, #8b0000, #dc3545, #ff6b6b); }
.mp-fill { width: 60%; background: linear-gradient(90deg, #00008b, #3498db, #5dade2); }
.cb-bar-value { position: absolute; right: 10px; font-size: 0.75rem; font-weight: 700; color: #fff; z-index: 2; text-shadow: 0 0 4px #000; }

.cb-stat-rows { display: flex; flex-direction: column; gap: 4px; }
.cb-stat-row { display: flex; align-items: center; padding: 6px 8px; background: rgba(0,0,0,0.2); border-radius: 4px; border: 1px solid transparent; transition: border-color 0.2s; }
.cb-stat-row:hover { border-color: #333; }
.cb-stat-name { flex: 1; font-size: 0.8rem; color: #ccc; }
.cb-stat-val { width: 35px; text-align: center; font-weight: 700; color: #fff; font-size: 0.9rem; }
.cb-btn-add, .cb-btn-sub { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #444; background: #1a1a2e; color: #d4a634; font-size: 0.9rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.cb-btn-add:hover, .cb-btn-sub:hover { background: #2a2a4a; border-color: #d4a634; }
.cb-btn-add:disabled, .cb-btn-sub:disabled { opacity: 0.3; cursor: not-allowed; }

.cb-unspent { text-align: center; color: #888; font-size: 0.8rem; margin-top: 10px; }
.cb-unspent span { color: #d4a634; font-weight: 700; font-size: 1rem; }
.cb-reset-btn { display: block; width: 100%; padding: 8px; margin-top: 8px; background: linear-gradient(180deg, #3a1a1a, #2a0a0a); border: 1px solid #6a2a2a; color: #e74c3c; border-radius: 6px; cursor: pointer; font-weight: 600; transition: all 0.2s; }
.cb-reset-btn:hover { background: #4a2a2a; border-color: #e74c3c; }

/* Equipment Panel */
.cb-equip-panel {
    background: rgba(20, 20, 20, 0.4);
    border-radius: 12px;
    padding: 20px;
}

.cb-paperdoll-grid {
    display: grid;
    grid-template-columns: 120px 1fr 120px;
    gap: 30px;
    align-items: center;
    position: relative;
}

.cb-paperdoll-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-silhouette-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(212,166,52,0.1) 0%, transparent 70%);
}

.cb-silhouette-img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0,0,0,0.8));
    transition: all 0.5s ease;
    opacity: 0.7;
}

.cb-slot {
    position: relative;
    width: 80px;
    height: 80px;
    background: rgba(0,0,0,0.6);
    border: 1px solid #333;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.5rem;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
    margin: 0 auto;
}

.cb-slot:hover {
    border-color: #d4a634;
    background: rgba(212,166,52,0.1);
    transform: scale(1.05);
}

.cb-slot.equipped {
    border-color: #d4a634;
    box-shadow: 0 0 15px rgba(212,166,52,0.2), inset 0 0 10px rgba(212,166,52,0.1);
}

.cb-slot-label {
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cb-equip-name {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: #d4a634;
    white-space: nowrap;
    text-shadow: 0 1px 2px black;
}

/* Modal Enhancements */
.cb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
}

.cb-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    max-width: 95vw;
    background: #1a1a1a;
    border: 1px solid #d4a634;
    border-radius: 8px;
    z-index: 2001;
    display: none;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    max-height: 85vh;
}

.cb-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 15px;
}

.cb-modal-header h3 {
    margin: 0;
    color: #d4a634;
    font-family: 'Cinzel', serif;
    flex: 1;
}

.cb-modal-search {
    background: #0d0d0d;
    border: 1px solid #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    width: 200px;
}

.cb-modal-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1.5rem;
    cursor: pointer;
}

.cb-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

.cb-modal-item-group {
    background: #222;
    margin-bottom: 8px;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.cb-modal-item-group:hover {
    border-color: #d4a634;
    background: #2a2a2a;
}

.cb-modal-item-header {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.cb-modal-item-header strong { color: #eee; }
.cb-modal-item-header small { color: #888; font-size: 0.7rem; }

.cb-lvl-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 2px;
    padding: 5px;
}

.cb-lvl-btn {
    background: #111;
    border: 1px solid #333;
    color: #ccc;
    font-size: 0.7rem;
    padding: 4px 0;
    cursor: pointer;
}

.cb-lvl-btn:hover {
    background: #d4a634;
    color: black;
}

/* Refinement (8.1, 9.2 …) buttons have distinct purple style */
.cb-ref-btn {
    border-color: #7c3aed !important;
    color: #c4b5fd !important;
    background: #1a0a2e !important;
    font-size: 0.65rem;
}
.cb-ref-btn:hover {
    background: #7c3aed !important;
    color: #fff !important;
}

.cb-modal-unequip {
    padding: 12px;
    text-align: center;
    color: #e74c3c;
    cursor: pointer;
    border: 1px dashed #e74c3c;
    margin-bottom: 10px;
    border-radius: 4px;
}

.cb-tooltip {
    position: fixed;
    background: rgba(10,10,10,0.95);
    border: 1px solid #d4a634;
    padding: 15px;
    border-radius: 6px;
    z-index: 3000;
    pointer-events: none;
    width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: none;
}

.cb-tt-name { font-family: 'Cinzel', serif; color: #d4a634; font-size: 1rem; margin-bottom: 8px; border-bottom: 1px solid #333; padding-bottom: 4px; }
.cb-tt-stat { display: flex; justify-content: space-between; font-size: 0.8rem; color: #ccc; margin-bottom: 2px; }
.cb-tt-stat span:first-child { color: #888; }
.cb-tt-set { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #444; color: #3498db; font-size: 0.75rem; }

@media (max-width: 900px) {
    .cb-paperdoll-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .cb-paperdoll-column {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    .cb-silhouette-container { height: 300px; min-height: 300px; order: -1; }
}

/* Info Panel */
.cb-info-panel { background: linear-gradient(180deg, #12121e 0%, #0a0a14 100%); border: 1px solid #2a2a3e; border-radius: 10px; padding: 15px; }
.cb-info-section { display: flex; flex-direction: column; gap: 4px; margin-bottom: 5px; }
.cb-info-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; background: rgba(0,0,0,0.3); border-radius: 4px; font-size: 0.8rem; border-left: 3px solid #333; }
.cb-info-row span:first-child { color: #aaa; }
.cb-info-row span:last-child { font-weight: 700; color: #fff; }
.cb-info-row.attack { border-left-color: #e74c3c; }
.cb-info-row.defense { border-left-color: #3498db; }
.cb-info-row.fire { border-left-color: #e67e22; }
.cb-info-row.ice { border-left-color: #5dade2; }
.cb-info-row.lightning { border-left-color: #f1c40f; }
.cb-info-row.poison { border-left-color: #27ae60; }
.cb-info-row.curse { border-left-color: #8e44ad; }

/* Equipped List & Set Bonuses */
.cb-equipped-list, .cb-set-bonuses { height: 1300px; overflow-y: auto; padding: 5px; background: rgba(0,0,0,0.2); border-radius: 6px; border: 1px solid rgba(255,255,255,0.05); }
.cb-eq-item { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; background: rgba(0,0,0,0.2); border-radius: 4px; margin-bottom: 3px; border: 1px solid #222; }
.cb-eq-name { font-size: 0.75rem; color: #ccc; }
.cb-eq-lvl { color: #d4a634; font-weight: 700; }
.cb-eq-remove { background: none; border: none; color: #e74c3c; cursor: pointer; font-size: 0.8rem; padding: 2px 6px; }
.cb-eq-remove:hover { color: #fff; }

/* Modal and Overlay handled above */
.cb-modal-header { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border-bottom: 1px solid #2a2a3e; }
.cb-modal-header h3 { flex: 1; margin: 0; color: #d4a634; font-size: 1rem; }
.cb-modal-search { padding: 6px 10px; background: #0d0d15; border: 1px solid #333; color: #fff; border-radius: 6px; font-size: 0.85rem; width: 160px; }
.cb-modal-close { background: none; border: 1px solid #444; color: #888; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 0.9rem; }
.cb-modal-close:hover { border-color: #e74c3c; color: #e74c3c; }
.cb-modal-body { overflow-y: auto; padding: 10px 15px; flex: 1; }
.cb-modal-item { padding: 8px 12px; background: rgba(0,0,0,0.3); border: 1px solid #222; border-radius: 6px; margin-bottom: 6px; cursor: pointer; color: #ccc; font-size: 0.85rem; transition: all 0.2s; }
.cb-modal-item:hover { border-color: #d4a634; background: rgba(212,166,52,0.08); }
.cb-modal-unequip { color: #e74c3c; border-color: #3a1a1a; }
.cb-modal-item-group { border: 1px solid #222; border-radius: 6px; margin-bottom: 6px; overflow: hidden; }
.cb-modal-item-header { display: flex; justify-content: space-between; align-items: center; padding: 8px 12px; background: rgba(0,0,0,0.3); }
.cb-modal-item-header strong { color: #d4a634; font-size: 0.85rem; }
.cb-modal-item-header small { color: #666; font-size: 0.7rem; }
.cb-modal-levels { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 12px; background: rgba(0,0,0,0.15); }
.cb-lvl-btn { padding: 3px 10px; background: #1a1a2e; border: 1px solid #333; color: #ccc; font-size: 0.75rem; cursor: pointer; border-radius: 4px; transition: all 0.2s; }
.cb-lvl-btn:hover { border-color: #d4a634; color: #fff; background: #2a2a4a; }
/* Tooltips & Set Bonuses */
.cb-tooltip {
    position: fixed;
    z-index: 3000;
    width: 240px;
    background: linear-gradient(135deg, #1a1a2e 0%, #0d0d15 100%);
    border: 1px solid #d4a634;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5), 0 0 15px rgba(212,166,52,0.1);
    pointer-events: none;
    font-size: 0.8rem;
    color: #eee;
    display: none;
}
.cb-tt-name { color: #d4a634; font-weight: 700; margin-bottom: 2px; font-size: 1rem; font-family: 'Cinzel', serif; }
.cb-tt-cat { color: #888; font-size: 0.7rem; margin-bottom: 10px; border-bottom: 1px solid #333; padding-bottom: 5px; }
.cb-tt-stat { display: flex; justify-content: space-between; margin-bottom: 4px; padding-bottom: 2px; border-bottom: 1px dotted rgba(255,255,255,0.05); }
.cb-tt-stat span:first-child { color: #aaa; }
.cb-tt-stat span:last-child { color: #4ade80; font-weight: 700; }

.cb-modal-search {
    background: rgba(0,0,0,0.3);
    border: 1px solid #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    width: 220px;
    transition: all 0.3s;
}
.cb-modal-search:focus {
    outline: none;
    border-color: #d4a634;
    width: 250px;
    background: rgba(0,0,0,0.5);
}

.cb-eq-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #222;
    transition: all 0.2s;
}
.cb-eq-item:hover { border-color: #333; }
.cb-eq-name { font-size: 0.8rem; color: #eee; }
.cb-eq-lvl { color: #d4a634; font-weight: 700; margin-left: 10px; }

/* Chat Styles */
.chat-container {
    display: flex;
    gap: 20px;
    height: 600px;
    margin-top: 20px;
}

.chat-main {
    flex: 2;
    background: #1a1c24;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-msg-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid var(--primary-gold);
}

.chat-msg-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.chat-msg-nick {
    color: var(--primary-gold);
    font-weight: bold;
}

.chat-msg-nick.me {
    color: #3498db;
}

.chat-msg-time {
    color: var(--text-muted);
}

.chat-msg-body {
    word-break: break-word;
    line-height: 1.5;
    color: #eee;
}

.chat-sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-input-wrapper {
    background: #1a1c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#chat-textarea {
    width: 100%;
    height: 150px;
    background: #0a0b10;
    color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 12px;
    resize: none;
    font-family: inherit;
    font-size: 1rem;
}

#chat-textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 5px rgba(243, 156, 18, 0.3);
}

.chat-sidebar-card {
    margin-top: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.chat-nick-edit-row {
    display: flex;
    gap: 10px;
}

#chat-nick-input {
    flex: 1;
    background: #0a0b10;
    color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    font-size: 0.9rem;
}

#chat-nick-input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
        height: auto;
    }
    .chat-messages {
        height: 400px;
    }
}
.cb-eq-remove { 
    background: none; 
    border: 1px solid #333; 
    color: #666; 
    border-radius: 50%; 
    width: 20px; 
    height: 20px; 
    font-size: 0.7rem; 
    cursor: pointer;
    margin-left: 10px;
}
.cb-eq-remove:hover { border-color: #e74c3c; color: #e74c3c; }

.cb-bonus-container { display: flex; flex-direction: column; gap: 8px; padding: 10px; background: rgba(0,0,0,0.2); border-radius: 8px; min-height: 50px; }
.cb-active-set { background: rgba(212,166,52,0.05); border: 1px solid rgba(212,166,52,0.2); padding: 8px; border-radius: 6px; border-left: 4px solid #d4a634; }
.cb-active-set .set-name { display: block; color: #d4a634; font-weight: 700; font-size: 0.85rem; margin-bottom: 2px; }
.cb-active-set small { color: #4ade80; font-size: 0.7rem; display: block; line-height: 1.2; }
.cb-no-bonus { color: #555; font-size: 0.75rem; text-align: center; font-style: italic; padding: 10px 0; }

@keyframes pulse-badge { 0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(231, 76, 60, 0); } 100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); } }

/* =========================================
   PREMIUM HOME PAGE STYLES
   ========================================= */
.home-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Premium Hero */
.premium-hero {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(26, 31, 46, 0.8) 100%),
                url('assets/bg.jpg') center/cover no-repeat;
    border-radius: 12px;
    padding: 60px 30px;
    text-align: center;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}

.premium-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.6) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(212,175,55,0.4);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #e2e8f0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.feature-card {
    background: rgba(26, 31, 46, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-gold);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.15);
    background: rgba(26, 31, 46, 0.9);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-gold);
    margin-bottom: 15px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #fff;
}

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

/* Video Section */
.video-section {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px;
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.video-icon {
    color: var(--primary-gold);
    font-size: 1.5rem;
}

.video-header h4 {
    font-family: var(--font-heading);
    color: var(--primary-gold);
    font-size: 1.3rem;
    margin: 0;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 800px;
    margin: 0 auto;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%; border: 0;
}

/* Community Links */
.community-links {
    text-align: center;
    padding: 20px;
    background: rgba(26, 31, 46, 0.4);
    border-radius: 8px;
    border-top: 2px solid var(--primary-gold);
}

.community-links p {
    margin-bottom: 10px;
    color: #e2e8f0;
}

.community-links a {
    color: var(--primary-gold);
    text-decoration: none;
    font-weight: bold;
}

.community-links a:hover {
    text-decoration: underline;
}

.disclaimer {
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
    font-style: italic;
}

/* =========================================
   BOTTOM NAVIGATION BAR FOR MOBILE
   ========================================= */
@media screen and (max-width: 768px) {
    .main-header {
        padding-bottom: 10px !important;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .premium-hero {
        padding: 40px 20px;
    }

    .video-section {
        padding: 15px;
    }

    .video-header h4 {
        font-size: 1rem;
        text-align: center;
    }

    /* Transform Top Nav into Bottom Nav */
    .main-nav {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 65px !important;
        background: rgba(15, 18, 25, 0.95) !important;
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-top: 1px solid rgba(212, 175, 55, 0.3);
        z-index: 9999 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;
        align-items: center !important;
        padding: 0 5px !important;
        margin: 0 !important;
        box-shadow: 0 -5px 20px rgba(0,0,0,0.5);
    }

    .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 5px !important;
        border: none !important;
        background: transparent !important;
        font-size: 0.7rem !important;
        gap: 4px;
        flex: 1;
        text-align: center;
        white-space: normal !important;
        line-height: 1.1;
    }

    .nav-item.active {
        color: var(--primary-gold) !important;
        background: transparent !important;
    }
    
    .nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 3px;
        background: var(--primary-gold);
        border-radius: 3px 3px 0 0;
    }

    .nav-icon {
        font-size: 1.3rem;
        margin-bottom: 2px;
    }

    /* Need space at bottom of content to not be hidden by nav */
    .app-container {
        padding-bottom: 80px;
    }

    /* Calculator cards vertically stacked */
    .control-card {
        padding: 15px;
    }
    
    .form-group input, 
    .form-group select {
        padding: 12px 10px; /* larger touch target */
        font-size: 16px; /* prevent iOS zoom */
    }
}
