/* 
 * Terraformation specific styles
 * High-tech survival terminal aesthetic
 */

:root {
    --terra-primary: #00f2ff;
    --terra-secondary: #ff8c00;
    --terra-bg: #0a0e14;
    --terra-panel: rgba(16, 23, 33, 0.85);
    --terra-accent: #ff3e3e;
    --terra-border: rgba(0, 242, 255, 0.3);
}

body.terra-theme {
    background-color: var(--terra-bg);
    color: #e0e0e0;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.terra-theme main {
    background-color: #0f172a;
    /* Dark blue-grey for main area */
    color: #e2e8f0;
    box-shadow: 0 0 40px rgba(0, 242, 255, 0.05);
}

body.terra-theme section {
    border-color: var(--terra-border);
    background: rgba(16, 23, 33, 0.4);
}

body.terra-theme table {
    border: 1px solid var(--terra-border);
    background: rgba(0, 0, 0, 0.2);
}

body.terra-theme thead tr {
    background: rgba(0, 242, 255, 0.1);
    color: var(--terra-primary);
    border-bottom: 2px solid var(--terra-primary);
}

body.terra-theme td {
    border-bottom: 1px solid rgba(0, 242, 255, 0.1);
}

body.terra-theme tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

.terra-terminal {
    background: var(--terra-panel);
    border: 1px solid var(--terra-border);
    border-radius: 4px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.1);
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.terra-terminal::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--terra-primary), transparent);
    animation: scanline 4s linear infinite;
    z-index: 10;
}

@keyframes scanline {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

.terra-terminal h3 {
    color: var(--terra-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid var(--terra-border);
    padding-bottom: 0.5rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.terra-terminal h3::before {
    content: ">>";
    font-family: monospace;
}

.rule-highlight {
    background: rgba(0, 242, 255, 0.05);
    border-left: 3px solid var(--terra-primary);
    padding: 1rem;
    margin: 1rem 0;
}

.danger-zone {
    border-color: var(--terra-accent);
}

.danger-zone h3 {
    color: var(--terra-accent);
}

.terra-terminal .card-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--terra-border);
    color: #e2e8f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.terra-terminal .card-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.1);
}

.terra-terminal .card-item h3 {
    color: var(--terra-primary);
    border-bottom: 1px solid var(--terra-border);
}

.illustration-box {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    margin: 1.5rem 0;
    border: 1px solid var(--terra-border);
    background: #000;
}

.illustration-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.8;
}

.illustration-box:hover img {
    transform: scale(1.03);
    opacity: 1;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

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

.stat-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--terra-primary);
    color: var(--terra-bg);
    font-weight: bold;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: monospace;
}

.joker-box {
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.05), rgba(0, 0, 0, 0.5));
    border: 1px dashed var(--terra-secondary);
}

.joker-box h3 {
    color: var(--terra-secondary);
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: var(--terra-primary);
    animation: blink 1s step-end infinite;
    vertical-align: middle;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

ul {
    list-style-type: none;
    padding-left: 0;
}

ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

ul li::before {
    content: "■";
    position: absolute;
    left: 0;
    color: var(--terra-primary);
    font-size: 0.8em;
    top: 50%;
    transform: translateY(-50%);
}

.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.3s ease;
}

.tile-card:hover {
    border-color: var(--terra-primary);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.2);
}

.tile-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.tile-icon img {
    width: 256px;
    height: 256px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--terra-border);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #000;
}

.tile-card:hover .tile-icon img {
    border-color: var(--terra-primary);
    box-shadow: 0 0 20px rgba(0, 242, 255, 0.4);
    transform: scale(1.05);
}

.tile-title {
    color: var(--terra-primary);
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-family: monospace;
}

.tile-desc {
    color: #94a3b8;
    font-size: 0.95rem;
}