/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c1810;
    background: linear-gradient(135deg, #f4f1e8 0%, #e8dcc0 100%);
    background-attachment: fixed;
}

/* Navigation */
.navbar {
    background: linear-gradient(90deg, #8b4513 0%, #a0522d 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 2px solid #654321;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f4f1e8;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: #f4f1e8;
    font-weight: 500;
    transition: color 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.nav-menu a:hover {
    color: #ffd700;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Better mobile touch targets */
button,
input,
select {
    min-height: 44px;
}

/* Focus indicators for accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid #8b4513;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #8b4513;
    color: #f4f1e8;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Prevent horizontal scroll */
* {
    max-width: 100%;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

.hero {
    text-align: center;
    padding: 40px 0;
}

.hero h1 {
    font-size: 2.5rem;
    color: #8b4513;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    color: #5d4037;
    font-style: italic;
}

/* Calculator Section */
.calculator-section {
    background: linear-gradient(145deg, #fff8e1, #f5f5dc);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #d4af37;
}

.calculator-container h2 {
    margin-bottom: 30px;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    font-size: 1.8rem;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.input-group input {
    width: 100%;
    max-width: 200px;
    padding: 10px;
    border: 2px solid #d4af37;
    border-radius: 6px;
    font-size: 16px;
    background: #fefefe;
    font-family: inherit;
}

.input-group input:focus {
    outline: none;
    border-color: #8b4513;
    box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
}

/* Monsters Section */
.monsters-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 1px solid #d4af37;
}

.monsters-section h3 {
    margin-bottom: 15px;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.monster-input {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    padding: 15px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.monster-input label {
    font-weight: 500;
    margin-bottom: 5px;
}

.monster-input input {
    width: 80px;
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    font-family: inherit;
}

.remove-monster {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

#add-monster {
    background: linear-gradient(145deg, #228b22, #32cd32);
    color: white;
    border: 2px solid #006400;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#add-monster:hover {
    background: linear-gradient(145deg, #32cd32, #228b22);
}

#calculate {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#calculate:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

/* Results */
.results {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.results.hidden {
    display: none;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 16px;
}

.result-item.difficulty {
    font-size: 18px;
    font-weight: bold;
    margin: 20px 0;
}

.difficulty-badge {
    padding: 5px 15px;
    border-radius: 20px;
    color: white;
}

.difficulty-trivial {
    background: #6c757d;
}

.difficulty-low {
    background: #28a745;
}

.difficulty-moderate {
    background: #ffc107;
    color: #000;
}

.difficulty-severe {
    background: #fd7e14;
}

.difficulty-extreme {
    background: #dc3545;
}

.thresholds {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.thresholds h4 {
    margin-bottom: 10px;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.threshold-list div {
    margin-bottom: 5px;
}

/* Info Section */
.info-section {
    background: linear-gradient(145deg, #fff8e1, #f5f5dc);
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #d4af37;
}

.info-section h2 {
    color: #8b4513;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.feature h3 {
    color: #8b4513;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* XP Tables */
.xp-table-section {
    margin: 30px 0;
}

.table-container {
    overflow-x: auto;
    margin: 20px 0;
}

.xp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fefefe;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.xp-table th {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: #f4f1e8;
    padding: 12px;
    text-align: center;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.xp-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #e6d3a3;
}

.xp-table tr:nth-child(even) {
    background: #f9f6f0;
}

.xp-table tr:hover {
    background: #f0e68c;
}

/* Monster XP Grid */
.monster-xp-section {
    margin: 30px 0;
}

.xp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.xp-item {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    text-align: center;
}

/* Example Encounters */
.encounter-examples {
    background: linear-gradient(145deg, #fff8e1, #f5f5dc);
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #d4af37;
}

.encounter-examples h2 {
    color: #8b4513;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.example-card {
    background: #fefefe;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.example-card h4 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.example-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* Tips Section */
.tips-section {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 40px 30px;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #d4af37;
}

.tips-section h2 {
    color: #8b4513;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.tip {
    background: #fefefe;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6d3a3;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.tip h4 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 1rem;
}

.tip p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.tip a {
    color: #8b4513;
    font-weight: bold;
}

.hero-image {
    text-align: center;
    margin: 20px 0;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Hazard Calculator Styles */
.hazard-input {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    padding: 15px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hazard-input select {
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    font-family: inherit;
    background: #fefefe;
}

.hazard-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.hazard-type-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.hazard-type-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.hazard-type-card p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.hazard-tips {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.hazard-tips h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.hazard-tips ul {
    margin-left: 20px;
}

.hazard-tips li {
    margin-bottom: 8px;
}

.remove-hazard {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

.hazards-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 1px solid #d4af37;
}

.hazards-section h3 {
    margin-bottom: 15px;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

#add-hazard {
    background: linear-gradient(145deg, #228b22, #32cd32);
    color: white;
    border: 2px solid #006400;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#add-hazard:hover {
    background: linear-gradient(145deg, #32cd32, #228b22);
}

#calculate-hazards {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#calculate-hazards:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

/* XP Calculator Styles */
.xp-source-input {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 15px;
    padding: 15px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xp-source-input select,
.xp-source-input input {
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    font-family: inherit;
    background: #fefefe;
}

.xp-sources-section {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 1px solid #d4af37;
}

.xp-sources-section h3 {
    margin-bottom: 15px;
    color: #8b4513;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.xp-award-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.xp-award-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.xp-award-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.xp-award-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.level-progression {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.level-progression h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.remove-xp-source {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

#add-xp-source {
    background: linear-gradient(145deg, #228b22, #32cd32);
    color: white;
    border: 2px solid #006400;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#add-xp-source:hover {
    background: linear-gradient(145deg, #32cd32, #228b22);
}

#calculate-xp-rewards {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#calculate-xp-rewards:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

/* Initiative Tracker Styles */
.combat-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 2px solid #d4af37;
    margin-bottom: 20px;
}

.round-info {
    font-size: 1.1rem;
    color: #8b4513;
}

.round-info strong {
    color: #654321;
}

.combat-buttons {
    display: flex;
    gap: 10px;
}

.combat-buttons button {
    padding: 8px 16px;
    border: 2px solid #8b4513;
    border-radius: 6px;
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.combat-buttons button:hover:not(:disabled) {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

.combat-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.add-combatant-section {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    margin-bottom: 20px;
}

.add-combatant-section h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.combatant-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.combatant-form input,
.combatant-form select {
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    font-family: inherit;
}

.combatant-form input[type="text"] {
    flex: 1;
    min-width: 150px;
}

.combatant-form input[type="number"] {
    width: 80px;
}

.combatant-form button {
    padding: 8px 16px;
    background: linear-gradient(145deg, #228b22, #32cd32);
    color: white;
    border: 2px solid #006400;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.combatant-form button:hover {
    background: linear-gradient(145deg, #32cd32, #228b22);
}

.initiative-list {
    background: linear-gradient(145deg, #fff8e1, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
}

.initiative-list h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.combatant-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    transition: all 0.3s ease;
}

.combatant-item.active-turn {
    background: linear-gradient(145deg, #ffd700, #ffed4e);
    border-color: #8b4513;
    box-shadow: 0 0 10px rgba(139, 69, 19, 0.3);
    transform: scale(1.02);
}

.combatant-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.combatant-name {
    font-weight: bold;
    color: #8b4513;
    min-width: 120px;
}

.combatant-initiative {
    background: #8b4513;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.combatant-type-badge {
    background: #d4af37;
    color: #654321;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: bold;
}

.combatant-item[data-type="pc"] .combatant-type-badge {
    background: #228b22;
    color: white;
}

.remove-combatant {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
}

.empty-state {
    text-align: center;
    color: #8b4513;
    font-style: italic;
    padding: 20px;
}

.tracker-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.feature-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.combat-tips {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.combat-tips h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.combat-tips ul {
    margin-left: 20px;
}

.combat-tips li {
    margin-bottom: 8px;
}

/* Random Encounter Generator Styles */
.generator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 2px solid #d4af37;
}

.generator-form .input-group {
    margin-bottom: 0;
}

.generator-form select {
    width: 100%;
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    font-family: inherit;
    background: #fefefe;
}

#generate-encounter {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#generate-encounter:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

.encounter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4af37;
}

.encounter-header h4 {
    color: #8b4513;
    margin: 0;
    font-size: 1.3rem;
}

.encounter-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.difficulty-badge,
.environment-badge,
.level-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.difficulty-badge.trivial {
    background: #90EE90;
    color: #006400;
}

.difficulty-badge.low {
    background: #FFD700;
    color: #8B4513;
}

.difficulty-badge.moderate {
    background: #FFA500;
    color: #8B4513;
}

.difficulty-badge.severe {
    background: #FF6347;
    color: white;
}

.difficulty-badge.extreme {
    background: #DC143C;
    color: white;
}

.environment-badge {
    background: #8b4513;
    color: #f4f1e8;
}

.level-badge {
    background: #d4af37;
    color: #654321;
}

.encounter-description {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    margin-bottom: 15px;
}

.combat-details,
.exploration-details,
.social-details {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #d4af37;
}

.combat-details p,
.exploration-details p,
.social-details p {
    margin-bottom: 8px;
}

.regenerate-btn {
    background: linear-gradient(145deg, #228b22, #32cd32);
    color: white;
    border: 2px solid #006400;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    margin-top: 20px;
}

.regenerate-btn:hover {
    background: linear-gradient(145deg, #32cd32, #228b22);
}

.encounter-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.encounter-type-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.encounter-type-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.encounter-type-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.environment-guide {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.environment-guide h3 {
    color: #8b4513;
    margin-bottom: 20px;
}

.environment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.env-card {
    background: #fefefe;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    text-align: center;
}

.env-card h4 {
    color: #8b4513;
    margin-bottom: 10px;
    font-size: 1rem;
}

.env-card p {
    font-size: 0.85rem;
    color: #654321;
    margin: 0;
}

/* Encounter Adjuster Styles */
.adjustment-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 2px solid #d4af37;
}

.adjustment-form .input-group {
    margin-bottom: 0;
}

.adjustment-form select {
    width: 100%;
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
    font-family: inherit;
    background: #fefefe;
}

#calculate-adjustment {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#calculate-adjustment:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

.adjustment-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.adjustment-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.adjustment-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.adjustment-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.adjustment-tips {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.adjustment-tips h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.adjustment-tips ul {
    margin-left: 20px;
}

.adjustment-tips li {
    margin-bottom: 8px;
}

/* Daily XP Planner Styles */
.planner-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 2px solid #d4af37;
}

#generate-daily-plan {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#generate-daily-plan:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

.daily-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    border-radius: 6px;
    border: 1px solid #e6d3a3;
}

.summary-item {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.summary-item span:first-child {
    font-size: 0.9rem;
    color: #8b4513;
    margin-bottom: 5px;
}

.summary-item span:last-child {
    font-size: 1.2rem;
    font-weight: bold;
    color: #654321;
}

#encounter-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.encounter-item {
    background: linear-gradient(145deg, #fefefe, #f8f8f8);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.encounter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.encounter-number {
    font-weight: bold;
    color: #8b4513;
    font-size: 1.1rem;
}

.encounter-phase {
    font-size: 0.8rem;
    color: #654321;
    background: #f0e68c;
    padding: 2px 6px;
    border-radius: 3px;
}

.encounter-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.xp-value {
    font-weight: bold;
    color: #8b4513;
}

.plan-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.export-btn {
    background: linear-gradient(145deg, #4682b4, #5f9ea0);
    color: white;
    border: 2px solid #2f4f4f;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

.export-btn:hover {
    background: linear-gradient(145deg, #5f9ea0, #4682b4);
}

.pacing-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.pacing-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.pacing-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.pacing-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.distribution-guide {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin: 30px 0;
}

.distribution-guide h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.distribution-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dist-row {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #fefefe;
    border-radius: 4px;
    border: 1px solid #e6d3a3;
}

.planning-tips {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.planning-tips h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.planning-tips ul {
    margin-left: 20px;
}

.planning-tips li {
    margin-bottom: 8px;
}

/* Monster Adjuster Styles */
.adjuster-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 2px solid #d4af37;
}

#adjust-monster {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

#adjust-monster:hover {
    background: linear-gradient(145deg, #a0522d, #8b4513);
}

.monster-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.monster-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4af37;
}

.monster-header h4 {
    color: #8b4513;
    margin: 0;
    font-size: 1.4rem;
}

.level-badge {
    background: #8b4513;
    color: #f4f1e8;
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
}

.monster-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 10px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
}

.stat-item span:first-child {
    font-size: 0.9rem;
    color: #8b4513;
    margin-bottom: 5px;
}

.stat-item span:last-child {
    font-size: 1.1rem;
    font-weight: bold;
    color: #654321;
}

.adjustment-notes {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #d4af37;
}

.adjustment-notes p {
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #654321;
}

.adjustment-notes p:last-child {
    margin-bottom: 0;
}

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

.template-card {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.template-card h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.template-card p {
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.scaling-guide {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin: 30px 0;
}

.scaling-guide h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.scaling-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.scale-row {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #fefefe;
    border-radius: 4px;
    border: 1px solid #e6d3a3;
}

.usage-tips {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.usage-tips h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.usage-tips ul {
    margin-left: 20px;
}

.usage-tips li {
    margin-bottom: 8px;
}

/* Encounter Analyzer Styles */
.analyzer-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    border-radius: 8px;
    border: 2px solid #d4af37;
}

.encounters-input {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    margin-bottom: 20px;
}

.encounters-input h3 {
    color: #8b4513;
    margin-bottom: 15px;
}

.encounter-input {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    padding: 10px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
}

.encounter-input input[type="text"] {
    flex: 2;
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
}

.encounter-input input[type="number"] {
    flex: 1;
    padding: 8px;
    border: 2px solid #d4af37;
    border-radius: 4px;
}

.remove-encounter {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
}

#add-encounter {
    background: linear-gradient(145deg, #228b22, #32cd32);
    color: white;
    border: 2px solid #006400;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
}

#analyze-encounters {
    background: linear-gradient(145deg, #8b4513, #a0522d);
    color: white;
    border: 2px solid #654321;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    margin: 20px 0;
    font-family: inherit;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.analysis-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    border-radius: 8px;
    border: 2px solid #d4af37;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    text-align: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #8b4513;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.3rem;
    font-weight: bold;
    color: #654321;
}

.difficulty-distribution {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-bottom: 20px;
}

.difficulty-distribution h4 {
    color: #8b4513;
    margin-bottom: 15px;
}

.distribution-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.distribution-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-label {
    min-width: 80px;
    font-weight: bold;
    color: #8b4513;
}

.bar-container {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fefefe;
    border-radius: 4px;
    border: 1px solid #e6d3a3;
    height: 25px;
    position: relative;
}

.bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.bar-fill.trivial {
    background: #90EE90;
}

.bar-fill.low {
    background: #FFD700;
}

.bar-fill.moderate {
    background: #FFA500;
}

.bar-fill.severe {
    background: #FF6347;
}

.bar-fill.extreme {
    background: #DC143C;
}

.bar-count {
    position: absolute;
    right: 8px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #654321;
}

.outliers-section {
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #d4af37;
    margin-bottom: 20px;
}

.outliers-section h4 {
    color: #8b4513;
    margin-bottom: 15px;
}

.outliers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.outlier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fefefe;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
}

.outlier-name {
    font-weight: bold;
    color: #8b4513;
}

.outlier-xp {
    color: #654321;
}

.recommendations-section {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
}

.recommendations-section h4 {
    color: #8b4513;
    margin-bottom: 15px;
}

.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.recommendation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #e6d3a3;
}

.recommendation-item.high {
    background: #ffebee;
    border-color: #f44336;
}

.recommendation-item.medium {
    background: #fff3e0;
    border-color: #ff9800;
}

.recommendation-item.low {
    background: #e8f5e8;
    border-color: #4caf50;
}

.recommendation-item.success {
    background: #e8f5e8;
    border-color: #4caf50;
}

.rec-icon {
    font-size: 1.2rem;
}

.rec-message {
    color: #654321;
    font-weight: 500;
}

.analysis-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.analysis-guide {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #d4af37;
    margin-top: 30px;
}

.analysis-guide h3 {
    color: #8b4513;
    margin-bottom: 20px;
}

.guide-section {
    margin-bottom: 20px;
}

.guide-section h4 {
    color: #8b4513;
    margin-bottom: 10px;
}

.guide-section ul {
    margin-left: 20px;
}

.guide-section li {
    margin-bottom: 8px;
}

/* Enhanced Header Styles */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #f4f1e8;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #f4f1e8;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: auto;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #8b4513;
    border: 2px solid #654321;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu li {
    margin: 0;
}

.nav-dropdown-menu a {
    display: block;
    padding: 12px 16px;
    color: #f4f1e8;
    text-decoration: none;
    border-bottom: 1px solid #654321;
    transition: background-color 0.3s ease;
}

.nav-dropdown-menu a:hover {
    background: #654321;
}

.nav-dropdown-menu li:last-child a {
    border-bottom: none;
}

.nav-menu a.active {
    background: #654321;
    border-radius: 4px;
}

/* Enhanced Footer Styles */
footer {
    background: linear-gradient(145deg, #8b4513, #654321);
    color: #f4f1e8;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.footer-section h4 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid #ffd700;
    padding-bottom: 5px;
}

.footer-section .footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-section .footer-links a {
    color: #f4f1e8;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.3s ease;
}

.footer-section .footer-links a:hover {
    color: #ffd700;
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 20px;
    border-top: 1px solid #654321;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.footer-disclaimer {
    font-size: 0.8rem;
    opacity: 0.8;
}

.footer-disclaimer a {
    color: #ffd700;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        display: flex;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
        order: 2;
    }

    .nav-logo {
        order: 1;
    }

    .nav-menu {
        display: none;
        order: 3;
    }

    .nav-menu-open {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #8b4513;
        border-top: 2px solid #654321;
        flex-direction: column;
        z-index: 1000;
    }

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid #654321;
    }

    .nav-menu a {
        display: block;
        padding: 15px 20px;
    }

    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #654321;
    }

    .nav-dropdown-menu a {
        padding-left: 40px;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Related Tools Section */
.related-tools {
    background: linear-gradient(145deg, #f0e68c, #f5deb3);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #d4af37;
    margin: 40px 0;
    text-align: center;
}

.related-tools h3 {
    color: #8b4513;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.related-tools>p {
    color: #654321;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background: linear-gradient(145deg, #fff8dc, #f5f5dc);
    border: 2px solid #d4af37;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: #8b4513;
}

.tool-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.tool-name {
    font-weight: bold;
    color: #8b4513;
    margin-bottom: 8px;
    font-size: 1rem;
}

.tool-desc {
    color: #654321;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.3;
}

.tools-footer {
    color: #654321;
    font-size: 1rem;
    margin-top: 20px;
}

.tools-footer a {
    color: #8b4513;
    font-weight: bold;
    text-decoration: none;
}

.tools-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .tool-card {
        padding: 15px;
    }

    .tool-icon {
        font-size: 1.5rem;
    }

    .tool-name {
        font-size: 0.9rem;
    }

    .tool-desc {
        font-size: 0.8rem;
    }
}

/* Footer */
footer {
    background: linear-gradient(90deg, #654321 0%, #8b4513 100%);
    color: #f4f1e8;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 3px solid #d4af37;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: #f4f1e8;
    text-decoration: none;
    margin: 0 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.footer-links a:hover {
    color: #ffd700;
}

/* Content Pages */
.content-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 40px 30px;
    background: linear-gradient(145deg, #fff8e1, #f5f5dc);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid #d4af37;
    line-height: 1.7;
}

.content-page h1 {
    color: #8b4513;
    margin-bottom: 20px;
    font-size: 2.2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.content-page h2 {
    color: #8b4513;
    margin: 30px 0 15px 0;
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.content-page h3 {
    color: #5d4037;
    margin: 25px 0 10px 0;
    font-size: 1.2rem;
}

.content-page ul,
.content-page ol {
    margin: 15px 0;
    padding-left: 30px;
}

.content-page li {
    margin-bottom: 8px;
}

.content-page a {
    color: #8b4513;
    text-decoration: none;
    font-weight: bold;
}

.content-page a:hover {
    color: #a0522d;
    text-decoration: underline;
}

.faq-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.faq-section:last-child {
    border-bottom: none;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    .nav-logo {
        margin-bottom: 10px;
    }

    .nav-menu {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-menu a {
        font-size: 0.9rem;
    }
}

/* Mobile Content */
@media (max-width: 768px) {
    main {
        padding: 0 15px;
    }

    .hero {
        padding: 20px 0;
        text-align: center;
    }

    .hero-image {
        margin: 15px 0;
    }

    .hero-image img {
        width: 100%;
        max-width: 300px;
        height: auto;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
    }

    .calculator-section,
    .info-section,
    .encounter-examples,
    .tips-section {
        padding: 20px 15px;
        margin-bottom: 20px;
    }

    .calculator-container h2 {
        font-size: 1.4rem;
    }

    .input-group {
        margin-bottom: 15px;
    }

    .input-group input {
        max-width: 100%;
        width: 100%;
    }

    .monster-input {
        flex-direction: column;
        gap: 10px;
        padding: 15px 10px;
    }

    .monster-input input {
        width: 100%;
        max-width: none;
    }

    .monster-input label {
        font-size: 0.9rem;
    }

    .remove-monster {
        align-self: center;
        margin-top: 10px;
    }

    #add-monster {
        width: 100%;
        padding: 12px;
    }

    #calculate {
        font-size: 16px;
        padding: 12px 20px;
    }

    .results {
        padding: 15px;
    }

    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
        margin-bottom: 15px;
    }

    .difficulty-badge {
        align-self: flex-start;
    }

    .features {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .example-grid,
    .tips-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .xp-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .xp-item {
        padding: 12px;
        font-size: 0.9rem;
    }

    .table-container {
        margin: 15px -15px;
    }

    .xp-table {
        font-size: 0.8rem;
    }

    .xp-table th,
    .xp-table td {
        padding: 6px 4px;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .footer-links a {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 10px;
    }

    .nav-menu {
        gap: 15px;
    }

    .nav-menu a {
        font-size: 0.8rem;
    }

    main {
        padding: 0 10px;
    }

    .hero h1 {
        font-size: 1.6rem;
    }

    .calculator-section,
    .info-section,
    .encounter-examples,
    .tips-section,
    .content-page {
        padding: 15px 10px;
    }

    .content-page h1 {
        font-size: 1.6rem;
    }

    .monster-input {
        padding: 10px;
    }

    .hazard-input {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .hazard-input select,
    .hazard-input input {
        width: 100%;
        max-width: none;
    }

    .hazard-types {
        grid-template-columns: 1fr;
    }

    .remove-hazard {
        align-self: center;
        margin-top: 10px;
    }

    #add-hazard {
        width: 100%;
        padding: 12px;
    }

    .xp-source-input {
        flex-direction: column;
        gap: 10px;
        padding: 10px;
    }

    .xp-source-input select,
    .xp-source-input input {
        width: 100%;
        max-width: none;
    }

    .xp-award-types {
        grid-template-columns: 1fr;
    }

    .remove-xp-source {
        align-self: center;
        margin-top: 10px;
    }

    #add-xp-source {
        width: 100%;
        padding: 12px;
    }

    .combat-controls {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .combat-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .combatant-form {
        flex-direction: column;
        align-items: stretch;
    }

    .combatant-form input,
    .combatant-form select,
    .combatant-form button {
        width: 100%;
        margin-bottom: 10px;
    }

    .combatant-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .combatant-name {
        min-width: auto;
    }

    .tracker-features {
        grid-template-columns: 1fr;
    }

    .adjustment-form {
        grid-template-columns: 1fr;
    }

    .adjustment-types {
        grid-template-columns: 1fr;
    }

    .planner-form {
        grid-template-columns: 1fr;
    }

    #encounter-timeline {
        grid-template-columns: 1fr;
    }

    .daily-summary {
        grid-template-columns: 1fr;
    }

    .pacing-guide {
        grid-template-columns: 1fr;
    }

    .plan-actions {
        flex-direction: column;
    }

    .adjuster-form {
        grid-template-columns: 1fr;
    }

    .monster-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .monster-stats {
        grid-template-columns: 1fr;
    }

    .template-guide {
        grid-template-columns: 1fr;
    }

    .analyzer-form {
        grid-template-columns: 1fr;
    }

    .encounter-input {
        flex-direction: column;
        gap: 10px;
    }

    .encounter-input input {
        width: 100%;
    }

    .analysis-summary {
        grid-template-columns: 1fr;
    }

    .outlier-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .analysis-features {
        grid-template-columns: 1fr;
    }

    .xp-table th,
    .xp-table td {
        padding: 4px 2px;
        font-size: 0.7rem;
    }

    .example-card,
    .tip {
        padding: 15px;
    }

    .example-card h4,
    .tip h4 {
        font-size: 1rem;
    }

    .example-card p,
    .tip p {
        font-size: 0.85rem;
    }
}