/* Variables for ChestTrade page */
:root {
    --primary: #2e7d32;
    --secondary: #4caf50;
    --accent: #8bc34a;
    --dark: #1b5e20;
    --light: #e8f5e9;
    --text: #333333;
    --code-bg: #f5f5f5;
    --border: #dddddd;
    --gold: #FFD700;
    --emerald: #50C878;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #fcfcfc;
    padding-bottom: 2rem;
}

.container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Header styles */
.header {
    background-color: #2d5a27;
    background-image: url('../chest-trade/images/chest-trade-background.webp');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 3rem 0;
    text-align: center;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.header .container {
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--primary);
    margin: 1.5rem 0 1rem;
}

h1 {
    font-size: 2.2rem;
    border-bottom: 2px solid var(--emerald);
    padding-bottom: 0.5rem;
    margin-top: 0;
}

h2 {
    font-size: 1.8rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Code styles */
code, pre {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: var(--code-bg);
    border-radius: 3px;
}

code {
    padding: 0.2rem 0.4rem;
    font-size: 0.9rem;
}

pre {
    padding: 1rem;
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    border: 1px solid var(--border);
}

pre code {
    padding: 0;
    background-color: transparent;
}

/* Component styles */
.card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.alert {
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin: 1rem 0;
}

.alert-danger {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
}

.alert-success {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.alert-info {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

/* Table styles */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--light);
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Button styles */
.btn {
    display: inline-block;
    background-color: var(--emerald);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn:hover {
    background-color: var(--dark);
    text-decoration: none;
    color: white;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85rem;
    margin-right: 5px;
}

.tier-1 { background: #a0a0a0; color: white; }
.tier-2 { background: #5dade2; color: white; }
.tier-3 { background: #58d68d; color: white; }
.tier-4 { background: #f4d03f; color: #333; }
.tier-5 { background: #af7ac5; color: white; }

/* Mode comparison cards */
.mode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.mode-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 20px;
    border-top: 4px solid var(--emerald);
}

.mode-card h3 {
    margin-top: 0;
    color: var(--primary);
}

.mode-card.simple {
    border-top-color: #5dade2;
}

.mode-card.standard {
    border-top-color: var(--emerald);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    color: #777;
}

/* Download counter styles */
.download-stats {
    margin-top: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.download-count {
    font-weight: bold;
    color: #FFD700;
}

/* Back to home link */
.back-link {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 8px 15px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    color: white;
    transform: translateY(-2px);
}

.back-icon {
    margin-right: 6px;
    font-size: 1.1rem;
}

/* Version Badge */
.version-badge {
    display: inline-block;
    background: #FFD700;
    color: #333;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 10px;
    vertical-align: middle;
}

/* Feature cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 25px 0;
}

.feature-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.feature-card h3 {
    color: #333;
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--emerald);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 12px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .container {
        width: 92%;
    }

    .header {
        padding: 2rem 0;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

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