/* AI Tools Styling */

.ai-tool-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border);
}

.ai-tool-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.ai-tool-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 2rem;
}

/* Input Section */
.ai-input-section {
    background: var(--bg);
    padding: 2rem;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.ai-input-section h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.input-group select,
.input-group input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s;
}

.input-group select:focus,
.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(206, 66, 43, 0.1);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: normal;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.explosive-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.explosive-inputs input {
    padding: 0.5rem;
}

.ai-generate-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, #ff6b6b 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
}

.ai-generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(206, 66, 43, 0.3);
}

/* Output Section */
.ai-output-section {
    background: var(--bg);
    padding: 2rem;
    border-radius: 12px;
    min-height: 400px;
}

.ai-thinking {
    text-align: center;
    padding: 4rem 2rem;
}

.ai-thinking p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.ai-status {
    font-size: 0.95rem;
    margin-top: 1rem;
    opacity: 0.7;
}

/* AI Loader Animation */
.ai-loader {
    margin: 2rem auto;
    width: 60px;
    height: 60px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Results */
.ai-result {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.ai-result-header h3 {
    font-size: 1.75rem;
    color: var(--primary);
}

.ai-badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Base Designer Specific */
.base-visual {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
}

.base-grid {
    display: grid;
    gap: 4px;
    max-width: 300px;
    margin: 0 auto;
    padding: 1rem;
}

.base-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.honeycomb-cell {
    background: #444;
    border: 2px solid #666;
}

.core-cell {
    background: #2a5a3e;
    border: 2px solid #4caf50;
}

.tc-cell {
    background: var(--primary);
    color: white;
    border: 2px solid #ff6b6b;
    font-weight: 700;
}

.base-size {
    margin-top: 1rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.stat-box h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.stat-box p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stat-box strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.features-section,
.ai-recommendations,
.ai-protips,
.ai-tips {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.features-section h4,
.ai-recommendations h4,
.ai-protips h4,
.ai-tips h4 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.features-list,
.recommendations-list,
.ai-protips ul,
.ai-tips ul {
    list-style: none;
    padding: 0;
}

.features-list li,
.recommendations-list li,
.ai-protips ul li,
.ai-tips ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.features-list li:before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.recommendations-list li:before,
.ai-protips ul li:before,
.ai-tips ul li:before {
    content: '';
    position: absolute;
    left: 0;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.action-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.action-btn.primary {
    background: var(--primary);
    color: white;
}

.action-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.action-btn.secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.action-btn.secondary:hover {
    background: var(--primary);
    color: white;
}

/* Map Location Specific */
.location-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--border);
    transition: all 0.3s;
}

.location-card:hover {
    border-left-color: var(--primary);
    transform: translateX(4px);
}

.best-location {
    border-left-color: var(--primary);
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(206, 66, 43, 0.1) 100%);
}

.location-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.location-header h4 {
    color: var(--text);
    margin: 0;
}

.score-badge {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.score-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.score-label {
    font-size: 1rem;
    color: var(--text-muted);
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-label {
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    color: var(--text);
}

.traffic-very-high { color: #f44336; }
.traffic-high { color: #ff9800; }
.traffic-medium { color: #2196f3; }
.traffic-low { color: #4caf50; }
.traffic-very-low { color: #8bc34a; }

.best-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 1rem;
}

/* Raid Calculator Specific */
.raid-paths {
    margin-bottom: 2rem;
}

.raid-paths h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.raid-option {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 4px solid var(--border);
}

.best-option {
    border-left-color: var(--primary);
    background: linear-gradient(135deg, var(--bg-light) 0%, rgba(206, 66, 43, 0.1) 100%);
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.option-header h5 {
    margin: 0;
    color: var(--text);
}

.option-details {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.option-details span {
    color: var(--text-muted);
}

.sulfur-cost {
    color: var(--primary) !important;
    font-weight: 600;
}

.raid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.risk-meter {
    width: 100%;
    height: 20px;
    background: var(--bg);
    border-radius: 10px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.risk-bar {
    height: 100%;
    transition: width 0.5s ease, background 0.5s ease;
    border-radius: 10px;
}

.text-success {
    color: #4caf50;
    font-weight: 600;
}

.text-danger {
    color: #f44336;
    font-weight: 600;
}

/* Wipe Planner Specific */
.timeline-container {
    margin-bottom: 2rem;
}

.timeline-phase {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
    position: relative;
}

.timeline-phase:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 2rem;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--bg);
}

.phase-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.phase-time {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.95rem;
}

.phase-header h4 {
    margin: 0;
    color: var(--text);
    flex: 1;
}

.phase-priority {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

.objectives-list {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.objectives-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    line-height: 1.6;
}

.objectives-list li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 1rem;
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.phase-goal {
    background: var(--bg);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.milestones-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.milestones-section h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.milestones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.milestone-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border-top: 4px solid var(--border);
}

.milestone-card.critical {
    border-top-color: #f44336;
}

.milestone-card.high {
    border-top-color: #ff9800;
}

.milestone-card.medium {
    border-top-color: #2196f3;
}

.milestone-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.milestone-goal {
    color: var(--text);
    margin-bottom: 0.75rem;
}

.milestone-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.critical .milestone-badge {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.high .milestone-badge {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
}

.medium .milestone-badge {
    background: rgba(33, 150, 243, 0.2);
    color: #2196f3;
}

/* Base Grid Layouts */
.base-design-result {
    animation: fadeIn 0.5s;
}

.design-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #3a3a3a;
    margin-bottom: 30px;
}

.design-badges {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    justify-content: center;
}

.badge {
    background: linear-gradient(135deg, #ce422b 0%, #a33522 100%);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.design-desc {
    color: #bbb;
    font-size: 16px;
    margin: 15px 0;
}

.design-layout {
    margin: 30px 0;
    padding: 25px;
    background: #2d2d2d;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
}

.design-layout h3 {
    color: #ce422b;
    margin-bottom: 20px;
}

.base-grid {
    display: inline-block;
    border: 3px solid #ce422b;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.base-row {
    display: flex;
    gap: 3px;
}

.base-cell {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 13px;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: help;
    border: 1px solid rgba(255,255,255,0.1);
}

.base-cell.wall {
    background: #555;
    color: #888;
}

.base-cell.room {
    background: linear-gradient(135deg, #ce422b 0%, #a33522 100%);
    color: #fff;
    font-weight: bold;
}

.base-cell.empty {
    background: transparent;
    color: #333;
    border: 1px dashed #333;
}

.base-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 0 15px rgba(206, 66, 43, 0.6);
}

.layout-legend {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #aaa;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 6px;
}

.layout-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.layout-legend strong {
    color: #ce422b;
    font-family: 'JetBrains Mono', monospace;
}

.design-rooms,
.design-features,
.design-priority,
.design-tips {
    margin: 30px 0;
    padding: 25px;
    background: #2d2d2d;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
}

.design-rooms h3,
.design-features h3,
.design-priority h3,
.design-tips h3 {
    margin-bottom: 15px;
    color: #ce422b;
}

.room-list,
.feature-list {
    list-style: none;
    padding: 0;
}

.room-list li,
.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid #3a3a3a;
    color: #e0e0e0;
}

.room-list li:last-child,
.feature-list li:last-child {
    border-bottom: none;
}

.design-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.design-stats .stat-card {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #3a3a3a;
    transition: all 0.3s;
}

.design-stats .stat-card:hover {
    border-color: #ce422b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(206, 66, 43, 0.2);
}

.design-stats .stat-card h4 {
    color: #ce422b;
    margin-bottom: 12px;
    font-size: 15px;
}

.design-stats .stat-card p {
    color: #e0e0e0;
    line-height: 1.8;
    margin: 5px 0;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tip {
    background: #3a3a3a;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid #444;
}

.tip strong {
    color: #ce422b;
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
}

.tip p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 968px) {
    .ai-tool-grid {
        grid-template-columns: 1fr;
    }

    .ai-input-section {
        position: static;
    }

    .stats-container {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* RUST Foundation Grid Styles */
.rust-grid {
    display: inline-block;
    border: 3px solid #ce422b;
    padding: 15px;
    background: #1a1a1a;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.rust-row {
    display: flex;
    gap: 2px;
}

.rust-cell {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 11px;
    border-radius: 3px;
    transition: all 0.2s;
    cursor: help;
    border: 1px solid rgba(255,255,255,0.1);
}

.rust-cell.square {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: #fff;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.rust-cell.triangle {
    background: linear-gradient(135deg, #ce422b 0%, #a33522 100%);
    color: #fff;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.2);
}

.rust-cell.empty {
    background: transparent;
    color: #333;
    border: 1px dashed #333;
}

.rust-cell.square:hover,
.rust-cell.triangle:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 0 20px rgba(206, 66, 43, 0.8);
}

.foundation-legend {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    font-size: 13px;
    color: #aaa;
    padding: 15px;
    background: #2d2d2d;
    border-radius: 6px;
}

.foundation-legend div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.foundation-legend strong {
    color: #ce422b;
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
}

.layout-note {
    color: #888;
    font-size: 14px;
    font-style: italic;
    margin-bottom: 10px;
}

.base-foundation-layout {
    margin: 30px 0;
    padding: 25px;
    background: #2d2d2d;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
}

.base-foundation-layout h3 {
    color: #ce422b;
    margin-bottom: 10px;
}

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

.stat-box {
    background: #2d2d2d;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #3a3a3a;
    transition: all 0.3s;
}

.stat-box:hover {
    border-color: #ce422b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(206, 66, 43, 0.2);
}

.stat-box h4 {
    color: #ce422b;
    margin-bottom: 12px;
    font-size: 15px;
}

.stat-box p {
    color: #e0e0e0;
    line-height: 1.8;
    margin: 5px 0;
}

.build-tips {
    margin: 30px 0;
    padding: 25px;
    background: #2d2d2d;
    border-radius: 12px;
    border: 1px solid #3a3a3a;
}

.build-tips h3 {
    color: #ce422b;
    margin-bottom: 15px;
}

.build-tips ul {
    list-style: none;
    padding: 0;
}

.build-tips li {
    padding: 10px 0;
    border-bottom: 1px solid #3a3a3a;
    color: #e0e0e0;
}

.build-tips li:before {
    content: "✓ ";
    color: #ce422b;
    font-weight: bold;
    margin-right: 8px;
}

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