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

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gold-gradient: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.25);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 2000px;
    margin: 0 auto;
    padding: 24px;
}

header {
    text-align: center;
    margin-bottom: 32px;
    padding: 32px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
}

header h1 {
    font-size: 2.5em;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1em;
    font-weight: 500;
}

.main-layout {
    display: flex;
    gap: 24px;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
}

.module-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--success-gradient);
    opacity: 0;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-btn:hover::before {
    opacity: 0.5;
}

.nav-btn.active {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.nav-btn.active::before {
    opacity: 1;
}

.nav-btn .icon {
    font-size: 22px;
    z-index: 1;
}

.content {
    flex: 1;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 32px;
    min-height: 720px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-lg);
}

.module {
    display: none;
}

.module.active {
    display: block;
    animation: fadeInUp 0.5s ease-out;
}

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

.module h2 {
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    font-size: 1.7em;
    font-weight: 700;
    border-bottom: 2px solid rgba(17, 153, 142, 0.3);
    padding-bottom: 14px;
    letter-spacing: -0.3px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: var(--transition-smooth);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(17, 153, 142, 0.5);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.weather-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
}

.weather-info {
    margin-bottom: 28px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    font-size: 1.05em;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.info-row:hover {
    background: rgba(0, 0, 0, 0.35);
    transform: translateX(4px);
}

.info-row label {
    color: #38ef7d;
    font-weight: 700;
    font-size: 0.95em;
}

.weather-impact {
    margin-top: 24px;
    padding: 20px;
    background: rgba(246, 211, 101, 0.12);
    border-radius: 12px;
    border: 1px solid rgba(246, 211, 101, 0.3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.weather-impact h4 {
    color: #f6d365;
    margin-bottom: 12px;
    font-size: 1.1em;
}

.category-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    padding: 4px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.tab-btn {
    padding: 12px 22px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--success-gradient);
    color: white;
    box-shadow: 0 2px 12px rgba(17, 153, 142, 0.4);
}

.materials-grid, .microbes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
    max-height: 520px;
    overflow-y: auto;
    padding: 4px;
}

.materials-grid::-webkit-scrollbar, 
.microbes-grid::-webkit-scrollbar {
    width: 8px;
}

.materials-grid::-webkit-scrollbar-track,
.microbes-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.materials-grid::-webkit-scrollbar-thumb,
.microbes-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #11998e, #38ef7d);
    border-radius: 10px;
}

.material-card, .microbe-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.material-card::before, 
.microbe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--success-gradient);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

.material-card:hover, .microbe-card:hover {
    transform: translateY(-5px);
    border-color: rgba(17, 153, 142, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.material-card:hover::before,
.microbe-card:hover::before {
    transform: scaleX(1);
}

.material-card.selected, .microbe-card.selected {
    background: rgba(17, 153, 142, 0.18);
    border-color: #38ef7d;
    box-shadow: 0 0 25px rgba(17, 153, 142, 0.3);
}

.material-card.selected::before,
.microbe-card.selected::before {
    transform: scaleX(1);
}

.material-card h4, .microbe-card h4 {
    color: #38ef7d;
    margin-bottom: 12px;
    font-size: 1.05em;
    font-weight: 700;
}

.material-card p, .microbe-card p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    line-height: 1.6;
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--success-gradient);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 4px;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.selected-summary {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--card-border);
    margin-top: 20px;
}

.selected-summary h4 {
    color: #38ef7d;
    margin-bottom: 14px;
    font-size: 1.05em;
}

.fertilizer-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.fertilizer-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 18px;
    padding: 32px 24px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.fertilizer-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition-smooth);
}

.fertilizer-card:hover {
    transform: translateY(-8px);
    border-color: #38ef7d;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.fertilizer-card:hover::before {
    opacity: 1;
}

.fertilizer-card.selected {
    border-color: #38ef7d;
    background: rgba(17, 153, 142, 0.2);
    box-shadow: 0 0 30px rgba(17, 153, 142, 0.4);
}

.fertilizer-card .icon {
    font-size: 4em;
    margin-bottom: 16px;
    display: block;
}

.fertilizer-card h3 {
    color: #38ef7d;
    font-size: 1.4em;
    margin-bottom: 12px;
    font-weight: 700;
}

.fertilizer-card p {
    color: var(--text-secondary);
    margin-bottom: 18px;
    font-size: 0.95em;
}

.features {
    text-align: left;
    margin-bottom: 20px;
}

.features li {
    list-style: none;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 0.9em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.features li:last-child {
    border-bottom: none;
}

.features li::before {
    content: '✓';
    color: #38ef7d;
    margin-right: 10px;
    font-weight: bold;
}

.btn-select {
    width: 100%;
    padding: 14px;
    background: var(--success-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-select:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(17, 153, 142, 0.5);
}

.dosage-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.dosage-item {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--card-border);
}

.dosage-item label {
    display: block;
    color: #38ef7d;
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.dosage-item input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1em;
    transition: var(--transition-smooth);
}

.dosage-item input:focus {
    outline: none;
    border-color: #38ef7d;
    box-shadow: 0 0 15px rgba(17, 153, 142, 0.3);
}

.animation-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--card-border);
}

.animation-visual {
    height: 300px;
    background: linear-gradient(135deg, rgba(100, 200, 255, 0.1), rgba(100, 200, 255, 0.05));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    position: relative;
    overflow: hidden;
}

.animation-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.reaction-status {
    background: rgba(0, 0, 0, 0.35);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--card-border);
}

.status-log {
    max-height: 220px;
    overflow-y: auto;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    font-size: 13px;
    padding: 4px;
}

.status-log p {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.status-log p:hover {
    background: rgba(255, 255, 255, 0.03);
    padding-left: 8px;
}

.records-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--card-border);
}

.record-header {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.record-section {
    margin-bottom: 24px;
}

.record-section h4 {
    color: #38ef7d;
    margin-bottom: 14px;
    font-size: 1.05em;
    font-weight: 700;
}

.record-actions {
    display: flex;
    gap: 16px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.result-text {
    font-size: 1.6em;
    font-weight: 800;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    letter-spacing: 1px;
}

.result-text.pass {
    background: rgba(17, 153, 142, 0.2);
    color: #38ef7d;
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.result-text.fail {
    background: rgba(245, 87, 108, 0.2);
    color: #f5576c;
    border: 1px solid rgba(245, 87, 108, 0.3);
}

.result-text.scrap {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.report-container {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.score-card {
    flex: 1;
    min-width: 320px;
    background: var(--card-bg);
    border-radius: 20px;
    padding: 36px;
    text-align: center;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-md);
}

.score-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--success-gradient);
    box-shadow: 0 10px 40px rgba(17, 153, 142, 0.4);
    position: relative;
    overflow: hidden;
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.25);
}

.score-circle .score-number {
    font-size: 3.5em;
    font-weight: 800;
    color: white;
    position: relative;
    z-index: 1;
}

.score-circle .score-label {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 1;
    font-weight: 600;
}

.report-preview {
    flex: 1;
    min-width: 420px;
    background: white;
    color: #333;
    border-radius: 20px;
    padding: 36px;
    box-shadow: var(--shadow-lg);
}

.report-preview h3 {
    color: #11998e;
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.5em;
    font-weight: 800;
}

#report-content {
    font-size: 14.5px;
    line-height: 2;
    color: #444;
}

@media (max-width: 1200px) {
    .main-layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .module-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.heavy-metals-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.limits-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--card-border);
}

.limits-table th, .limits-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.limits-table th {
    background: rgba(17, 153, 142, 0.25);
    color: #38ef7d;
    font-weight: 800;
    font-size: 0.95em;
}

.limits-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.heavy-metals-input {
    background: var(--card-bg);
    border-radius: 14px;
    padding: 24px;
    border: 1px solid var(--card-border);
}

.heavy-metals-input h3 {
    color: #38ef7d;
    margin-bottom: 22px;
    font-size: 1.15em;
    font-weight: 700;
}

.heavy-metal-input {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.heavy-metal-input:hover {
    background: rgba(0, 0, 0, 0.35);
}

.heavy-metal-input label {
    flex: 1;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95em;
}

.heavy-metal-input input {
    width: 160px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.heavy-metal-input input:focus {
    outline: none;
    border-color: #38ef7d;
    box-shadow: 0 0 12px rgba(17, 153, 142, 0.25);
}

.heavy-metal-input span {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    min-width: 60px;
}

.heavy-metal-result {
    padding: 12px;
    margin: 6px 0;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.heavy-metal-result.pass {
    background: rgba(17, 153, 142, 0.18);
    border-left: 3px solid #38ef7d;
}

.heavy-metal-result.fail {
    background: rgba(245, 87, 108, 0.18);
    border-left: 3px solid #f5576c;
}

.heavy-metals-result .info {
    color: var(--text-secondary);
    text-align: center;
    padding: 24px;
    font-size: 0.95em;
}

@media (max-width: 900px) {
    .heavy-metals-container {
        grid-template-columns: 1fr;
    }
}

.price-link-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.2), rgba(253, 160, 133, 0.15));
    border: 1px solid rgba(246, 211, 101, 0.5);
    border-radius: 14px;
    margin-bottom: 24px;
    box-shadow: 0 4px 15px rgba(246, 211, 101, 0.15);
}

.price-icon {
    font-size: 28px;
}

.price-link {
    color: #f6d365;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 700;
    font-size: 1em;
    transition: var(--transition-smooth);
}

.price-link:hover {
    color: #fda085;
    transform: translateX(4px);
}

.price-platform-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--card-border);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.price-platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
}

.price-platform-card:hover {
    transform: translateY(-6px);
    border-color: rgba(246, 211, 101, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.platform-name {
    font-size: 1.2em;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.platform-url {
    color: #87CEEB;
    font-size: 12px;
    margin-bottom: 14px;
    word-break: break-all;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.platform-url:hover {
    color: #38ef7d;
}

.platform-features {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.92em;
    line-height: 1.7;
}

.platform-entry {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    margin-bottom: 12px;
}

.platform-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.tag-type {
    background: rgba(17, 153, 142, 0.25);
    color: #38ef7d;
}

.tag-update {
    background: rgba(33, 150, 243, 0.25);
    color: #2196F3;
}

.tag-cost {
    background: rgba(246, 211, 101, 0.25);
    color: #f6d365;
}

.quick-guide-card {
    background: linear-gradient(135deg, rgba(246, 211, 101, 0.18), rgba(253, 160, 133, 0.12));
    border: 2px solid rgba(246, 211, 101, 0.4);
    border-radius: 18px;
    padding: 32px;
    margin-bottom: 18px;
    box-shadow: 0 8px 32px rgba(246, 211, 101, 0.15);
}

.quick-guide-title {
    font-size: 1.25em;
    font-weight: 800;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    text-align: center;
    letter-spacing: 0.5px;
}

.quick-guide-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    margin-bottom: 12px;
    border: 1px solid rgba(246, 211, 101, 0.2);
    transition: var(--transition-smooth);
}

.quick-guide-item:hover {
    transform: translateX(8px);
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(246, 211, 101, 0.4);
}

.quick-guide-number {
    width: 36px;
    height: 36px;
    background: var(--gold-gradient);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 1.05em;
}

.quick-guide-text {
    flex: 1;
    font-size: 0.98em;
    color: var(--text-primary);
    font-weight: 500;
}

.price-search-bar {
    margin-bottom: 24px;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 14px 20px;
    transition: var(--transition-smooth);
}

.search-input-wrapper:focus-within {
    border-color: #38ef7d;
    box-shadow: 0 0 20px rgba(17, 153, 142, 0.25);
}

.search-icon {
    font-size: 22px;
}

.price-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    outline: none;
}

.price-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.clear-search-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background: rgba(245, 87, 108, 0.25);
    color: #f5576c;
}

.price-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 13.5px;
    font-weight: 600;
}

.toolbar-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.toolbar-btn.active {
    background: var(--success-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.toolbar-icon {
    font-size: 18px;
}

.platform-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.action-btn {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.action-btn:hover {
    background: rgba(17, 153, 142, 0.2);
    color: #38ef7d;
    border-color: #38ef7d;
}

.action-btn.favorite-btn.active {
    background: rgba(246, 211, 101, 0.2);
    color: #f6d365;
    border-color: #f6d365;
}

.action-btn.favorite-btn.active .btn-icon {
    animation: heartBeat 0.4s ease-in-out;
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.action-btn.visit-btn {
    background: var(--success-gradient);
    color: white;
    border: none;
    font-weight: 700;
}

.action-btn.visit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.platform-details {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.detail-label {
    color: rgba(255, 255, 255, 0.5);
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

.expand-btn {
    width: 100%;
    margin-top: 12px;
    padding: 10px;
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition-smooth);
}

.expand-btn:hover {
    border-color: rgba(56, 239, 125, 0.5);
    color: #38ef7d;
}

.empty-state {
    text-align: center;
    padding: 60px 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.empty-state-icon {
    font-size: 5em;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state-text {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 10px;
}

.empty-state-subtext {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95em;
}

.city-search-section {
    margin-bottom: 28px;
}

.city-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    outline: none;
}

.city-search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.city-suggestions {
    position: relative;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    display: none;
    max-height: 280px;
    overflow-y: auto;
}

.city-suggestions.show {
    display: block;
}

.suggestion-item {
    padding: 14px 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.suggestion-item:hover {
    background: rgba(17, 153, 142, 0.2);
}

.suggestion-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05em;
}

.suggestion-province {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-top: 4px;
}

.weather-display {
    display: flex;
    gap: 32px;
    align-items: center;
    padding: 32px;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.15), rgba(56, 239, 125, 0.08));
    border-radius: 20px;
    margin-bottom: 28px;
    border: 1px solid rgba(17, 153, 142, 0.2);
}

.weather-icon-large {
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(246, 211, 101, 0.2), transparent);
    border-radius: 50%;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.weather-emoji {
    font-size: 5em;
}

.weather-main-info {
    flex: 1;
}

.city-name-large {
    font-size: 1.8em;
    font-weight: 800;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.temp-display {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 12px;
}

#temperature-large {
    font-size: 4em;
    font-weight: 800;
    color: var(--text-primary);
}

.temp-unit {
    font-size: 1.8em;
    color: var(--text-secondary);
    font-weight: 600;
}

.weather-desc {
    color: var(--text-secondary);
    font-size: 1.1em;
}

.weather-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.weather-detail-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
}

.weather-detail-item:hover {
    transform: translateY(-3px);
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(56, 239, 125, 0.2);
}

.detail-icon {
    font-size: 2em;
}

.detail-content {
    flex: 1;
}

.detail-label {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-bottom: 4px;
}

.detail-value {
    color: var(--text-primary);
    font-size: 1.2em;
    font-weight: 700;
}

.location-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.city-suggestions::-webkit-scrollbar {
    width: 6px;
}

.city-suggestions::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}

.city-suggestions::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #11998e, #38ef7d);
    border-radius: 10px;
}

@media (max-width: 768px) {
    .weather-display {
        flex-direction: column;
        text-align: center;
    }
    
    .weather-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .weather-details-grid {
        grid-template-columns: 1fr;
    }
}

.current-env-display {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1), rgba(56, 239, 125, 0.05));
    border-radius: 16px;
    border: 1px solid rgba(17, 153, 142, 0.15);
}

.env-info-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.env-icon {
    font-size: 2.5em;
}

.env-content {
    flex: 1;
}

.env-label {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-bottom: 4px;
}

.env-value {
    color: var(--text-primary);
    font-size: 1.4em;
    font-weight: 800;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.refresh-env-btn {
    margin-left: auto;
}

.material-category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.category-tab {
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
    font-size: 0.95em;
}

.category-tab:hover {
    background: rgba(17, 153, 142, 0.15);
    border-color: rgba(17, 153, 142, 0.3);
}

.category-tab.active {
    background: var(--success-gradient);
    border-color: transparent;
    color: white;
    font-weight: 700;
}

.dosing-search-wrapper {
    margin-bottom: 24px;
}

.dosing-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dosing-material-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.dosing-material-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #11998e, #38ef7d);
}

.dosing-material-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 0, 0, 0.35);
    border-color: rgba(56, 239, 125, 0.2);
}

.dosing-material-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.dosing-material-name {
    font-size: 1.15em;
    font-weight: 800;
    color: var(--text-primary);
}

.dosing-material-category {
    padding: 4px 10px;
    background: rgba(17, 153, 142, 0.2);
    border-radius: 12px;
    font-size: 0.75em;
    color: #38ef7d;
    font-weight: 700;
}

.suitability-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 700;
    margin-bottom: 12px;
}

.suitability-badge.suitable {
    background: rgba(56, 239, 125, 0.15);
    color: #38ef7d;
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.suitability-badge.warning {
    background: rgba(246, 211, 101, 0.15);
    color: #f6d365;
    border: 1px solid rgba(246, 211, 101, 0.3);
}

.suitability-badge.danger {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

.dosing-material-params {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.param-chip {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 0.8em;
    color: var(--text-secondary);
}

.dosing-detail-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 500px;
    max-width: 95vw;
    height: 100vh;
    background: rgba(15, 32, 39, 0.98);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    overflow-y: auto;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.detail-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(15, 32, 39, 0.98);
    z-index: 10;
}

.detail-panel-header h3 {
    margin: 0;
    font-size: 1.4em;
}

.close-detail-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.close-detail-btn:hover {
    background: rgba(255, 71, 87, 0.3);
}

.detail-content-inner {
    padding: 24px;
}

.detail-section {
    margin-bottom: 28px;
}

.detail-section-title {
    font-size: 1em;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.condition-range {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.range-bar-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 14px;
}

.range-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9em;
}

.range-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.range-optimal {
    position: absolute;
    height: 100%;
    background: linear-gradient(90deg, #11998e, #38ef7d);
    border-radius: 6px;
}

.range-current-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #f6d365;
    border: 3px solid white;
    border-radius: 50%;
    top: -2px;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

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

.advice-item {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 10px;
    border-left: 3px solid #38ef7d;
    font-size: 0.95em;
}

.advice-item.warning {
    border-left-color: #f6d365;
}

.advice-item.danger {
    border-left-color: #ff4757;
}

.time-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.time-chip {
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.2), rgba(56, 239, 125, 0.1));
    border-radius: 10px;
    border: 1px solid rgba(56, 239, 125, 0.2);
    font-size: 0.9em;
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .dosing-detail-panel {
        width: 100%;
    }
    
    .current-env-display {
        flex-direction: column;
        align-items: stretch;
    }
    
    .refresh-env-btn {
        margin-left: 0;
        width: 100%;
    }
}

.reactor-monitor-panel {
    background: linear-gradient(135deg, rgba(15, 32, 39, 0.95), rgba(32, 58, 67, 0.9));
    border: 1px solid rgba(17, 153, 142, 0.3);
    border-radius: 20px;
    padding: 28px;
    margin-bottom: 28px;
}

.monitor-title {
    font-size: 1.3em;
    font-weight: 800;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.monitor-item {
    display: flex;
    gap: 16px;
    padding: 18px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
}

.monitor-item:hover {
    transform: translateY(-3px);
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(56, 239, 125, 0.2);
}

.monitor-item.reactor-temp {
    border-left: 4px solid #ff6b6b;
}

.monitor-item.reactor-pressure {
    border-left: 4px solid #feca57;
}

.monitor-item.env-temp {
    border-left: 4px solid #48dbfb;
}

.monitor-item.env-humidity {
    border-left: 4px solid #1dd1a1;
}

.monitor-icon {
    font-size: 2.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.monitor-content {
    flex: 1;
}

.monitor-label {
    color: var(--text-secondary);
    font-size: 0.85em;
    margin-bottom: 6px;
}

.monitor-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 10px;
}

.monitor-value span:first-child {
    font-size: 2em;
    font-weight: 800;
    color: var(--text-primary);
}

.monitor-unit {
    font-size: 0.9em;
    color: var(--text-secondary);
}

.monitor-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

.monitor-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.reactor-temp-fill {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.reactor-pressure-fill {
    background: linear-gradient(90deg, #feca57, #ff9f43);
}

.env-temp-fill {
    background: linear-gradient(90deg, #48dbfb, #0abde3);
}

.env-humidity-fill {
    background: linear-gradient(90deg, #1dd1a1, #10ac84);
}

.monitor-trends {
    padding: 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 14px;
}

.trend-item {
    width: 100%;
}

.trend-label {
    color: var(--text-secondary);
    font-size: 0.9em;
    margin-bottom: 12px;
}

.trend-chart {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    height: 80px;
    padding: 10px 0;
}

.conversion-intro {
    background: linear-gradient(135deg, rgba(29, 209, 161, 0.1), rgba(16, 172, 132, 0.1));
    border: 1px solid rgba(29, 209, 161, 0.3);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.conversion-intro h3 {
    font-size: 1.4em;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.conversion-intro p {
    color: var(--text-secondary);
    font-size: 1.05em;
}

.conversion-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.conversion-tabs .tab-btn {
    padding: 12px 24px;
    border: 1px solid var(--card-border);
    background: var(--card-bg);
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    transition: var(--transition-smooth);
}

.conversion-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.conversion-tabs .tab-btn.active {
    background: var(--success-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(29, 209, 161, 0.3);
}

.conversion-content {
    animation: fadeIn 0.3s ease;
}

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

.conversion-form {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
}

.conversion-form .form-group {
    margin-bottom: 24px;
}

.conversion-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1em;
}

.conversion-form input,
.conversion-form select {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 1em;
    transition: var(--transition-smooth);
}

.conversion-form input:focus,
.conversion-form select:focus {
    outline: none;
    border-color: #1dd1a1;
    box-shadow: 0 0 0 3px rgba(29, 209, 161, 0.2);
}

.custom-factors {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-top: 16px;
}

.conversion-result {
    margin-top: 32px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(16, 172, 132, 0.15), rgba(29, 209, 161, 0.15));
    border: 1px solid rgba(29, 209, 161, 0.4);
    border-radius: 16px;
}

.conversion-result h4 {
    font-size: 1.2em;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    margin-bottom: 16px;
}

.result-label {
    font-size: 1.05em;
    color: var(--text-secondary);
}

.result-value {
    font-size: 1.8em;
    font-weight: bold;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.formula-display {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    border-left: 4px solid #1dd1a1;
}

.formula-display strong {
    color: var(--text-primary);
}

.formula-display code {
    font-family: 'Courier New', monospace;
    color: #1dd1a1;
    font-size: 0.95em;
}

.guide-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
}

.guide-section h4 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--card-border);
}

.guide-list {
    list-style: none;
    padding: 0;
}

.guide-list li {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 1.05em;
    color: var(--text-primary);
    transition: var(--transition-smooth);
}

.guide-list li:hover {
    background: rgba(0, 0, 0, 0.3);
    transform: translateX(4px);
}

.guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
}

.guide-table thead {
    background: var(--success-gradient);
}

.guide-table th {
    padding: 14px 16px;
    text-align: left;
    color: white;
    font-weight: 600;
}

.guide-table th:first-child {
    border-top-left-radius: 12px;
}

.guide-table th:last-child {
    border-top-right-radius: 12px;
}

.guide-table tbody tr {
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
}

.guide-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.3);
}

.guide-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
}

.warning-box {
    background: linear-gradient(135deg, rgba(255, 159, 67, 0.1), rgba(255, 87, 51, 0.1));
    border: 1px solid rgba(255, 159, 67, 0.4);
    border-radius: 12px;
    padding: 24px;
}

.warning-box p {
    font-size: 1.1em;
    color: #ffb74d;
    margin-bottom: 16px;
}

.warning-box ul {
    padding-left: 24px;
    color: var(--text-secondary);
}

.warning-box li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.direction-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.dir-btn {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-secondary);
    border-radius: 12px;
    cursor: pointer;
    font-size: 1em;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.dir-btn:hover {
    border-color: rgba(29, 209, 161, 0.5);
    background: rgba(29, 209, 161, 0.1);
}

.dir-btn.active {
    background: var(--success-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(29, 209, 161, 0.3);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.btn-primary {
    background: var(--success-gradient);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(29, 209, 161, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(29, 209, 161, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.materials-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 1px solid var(--card-border);
    transition: var(--transition-smooth);
}

.material-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: rgba(29, 209, 161, 0.4);
}

.material-name {
    font-weight: 600;
    color: var(--text-primary);
}

.material-spec {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.material-amount {
    font-weight: 700;
    color: #1dd1a1;
    font-size: 1.1em;
}

.btn-delete {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(238, 90, 90, 0.3);
}

.btn-delete:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 90, 0.4);
}

.btn-delete:active {
    transform: translateY(0);
}

.app-download-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 12px rgba(56, 239, 125, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.4);
}

.btn-success:active {
    transform: translateY(0);
}

.login-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 32px;
    background: var(--primary-gradient);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5em;
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1em;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--card-border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 1em;
    transition: var(--transition-smooth);
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.login-form input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #667eea;
}

.formula-value.highlight {
    color: var(--accent-color);
    font-weight: 700;
    font-size: 1.1em;
}

.formula-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--card-border);
}

.formula-row:last-child {
    border-bottom: none;
}

.formula-label {
    color: var(--text-secondary);
}

.formula-value {
    color: var(--text-primary);
    font-weight: 600;
}

.formula-value.highlight {
    color: #1dd1a1;
    font-weight: 700;
    font-size: 1.1em;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
}

.cost-label {
    color: var(--text-secondary);
}

.cost-value {
    color: #feca57;
    font-weight: 700;
    font-size: 1.05em;
}

.cost-total {
    border-top: 2px solid var(--card-border);
    margin-top: 12px;
    padding-top: 16px;
}

.cost-total .cost-value {
    font-size: 1.4em;
    color: #ff9f43;
}

.trend-bar {
    flex: 1;
    background: linear-gradient(180deg, #38ef7d, #11998e);
    border-radius: 4px 4px 0 0;
    min-height: 8px;
    transition: height 0.3s ease-out;
    animation: pulseBar 2s ease-in-out infinite;
}

.trend-bar:nth-child(1) { animation-delay: 0s; }
.trend-bar:nth-child(2) { animation-delay: 0.15s; }
.trend-bar:nth-child(3) { animation-delay: 0.3s; }
.trend-bar:nth-child(4) { animation-delay: 0.45s; }
.trend-bar:nth-child(5) { animation-delay: 0.6s; }
.trend-bar:nth-child(6) { animation-delay: 0.75s; }
.trend-bar:nth-child(7) { animation-delay: 0.9s; }
.trend-bar:nth-child(8) { animation-delay: 1.05s; }

@keyframes pulseBar {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.reactor-monitor-panel {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.monitor-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    color: var(--text-secondary);
    font-size: 0.95em;
}

.status-value {
    font-weight: 600;
    font-size: 1em;
    transition: color 0.3s ease;
}

.temp-scale-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #00d4ff 0%, #1dd1a1 25%, #feca57 50%, #ff9f43 75%, #ff6b6b 100%);
    border-radius: 8px;
    opacity: 0.9;
}

.scale-label {
    font-size: 0.85em;
    font-weight: 600;
    color: #1a1a2e;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.monitor-bar {
    height: 10px;
    position: relative;
}

.monitor-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
}

.pressure-info {
    margin-bottom: 20px;
}

.info-bubble {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(29, 209, 161, 0.1);
    border: 1px solid rgba(29, 209, 161, 0.2);
    border-radius: 10px;
}

.info-icon {
    font-size: 1.3em;
}

.info-text {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.5;
}

@keyframes pulse-bar {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

.trend-bar {
    animation: pulse-bar 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .monitor-grid {
        grid-template-columns: 1fr;
    }
    
    .monitor-item {
        padding: 14px;
    }
    
    .monitor-icon {
        font-size: 2em;
        min-width: 50px;
        height: 50px;
    }
    
    .monitor-value span:first-child {
        font-size: 1.8em;
    }
    
    .monitor-status-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .temp-scale-indicator {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .scale-label {
        font-size: 0.75em;
    }
}

.api-config-section {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.api-config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.api-config-header h4 {
    color: var(--text-primary);
    font-size: 1.05em;
    margin: 0;
}

.api-toggle {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.api-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.api-btn:hover {
    background: rgba(29, 209, 161, 0.15);
    border-color: rgba(29, 209, 161, 0.3);
}

.api-btn.active {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(29, 209, 161, 0.3);
}

.api-key-input {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.key-input-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
    display: flex;
}

.api-key-input {
    flex: 1;
    padding: 12px 45px 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95em;
    font-family: 'Courier New', monospace;
}

.api-key-input:focus {
    outline: none;
    border-color: rgba(29, 209, 161, 0.5);
}

.toggle-visibility-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toggle-visibility-btn:hover {
    opacity: 1;
}

.api-help-link {
    color: #1dd1a1;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.2s;
}

.api-help-link:hover {
    color: #10ac84;
    text-decoration: underline;
}

.btn-small {
    padding: 10px 18px;
    font-size: 0.9em;
    border-radius: 10px;
}

.refresh-btn {
    background: rgba(29, 209, 161, 0.15);
    border: 1px solid rgba(29, 209, 161, 0.3);
    color: #1dd1a1;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: rgba(29, 209, 161, 0.3);
    transform: rotate(180deg);
}

.weather-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(29, 209, 161, 0.2);
    border-top-color: #1dd1a1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.weather-loading p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 1em;
}
