/* templates/style.css */

body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
}
h1,
h2 {
    text-align: center;
    color: #00acc1;
    border-bottom: 2px solid #00acc1;
    padding-bottom: 10px;
}
h3 {
    text-align: center;
    color: #aaa;
    margin-top: 0;
}
nav {
    text-align: center;
    margin-bottom: 30px;
}
.summary a,
nav a {
    color: #80deea;
    font-size: 1.2em;
    text-decoration: none;
    border-bottom: 1px dotted #80deea;
    transition: color 0.2s;
}
nav a:hover {
    color: #ffffff;
    border-bottom: 1px solid #ffffff;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}
th,
td {
    border: 1px solid #333;
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle; /* Align content vertically */
}
thead {
    background-color: #212121;
}
th {
    font-weight: 600;
    color: #00acc1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tbody tr {
    background-color: #1a1a1a;
    transition: background-color 0.2s ease-in-out;
}
tbody tr:nth-of-type(even) {
    background-color: #242424;
}
tbody tr:hover {
    background-color: #007c8a;
    color: #ffffff;
}
tr.solved {
    background-color: #1a431a;
}
tr.solved:nth-of-type(even) {
    background-color: #1f4f1f;
}
tr.solved:hover {
    background-color: #2a632a;
}

/* NEW: Style for the "Zobacz kod" link */
.code-link {
    display: inline-block;
    background-color: #006064; /* Darker cyan */
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    text-align: center;
    transition: background-color 0.2s ease;
}
.code-link:hover {
    background-color: #00838f; /* Lighter cyan on hover */
    color: #ffffff;
}

/* Summary Styles */
.summary {
    text-align: center;
    margin: 20px 0;
    font-size: 1.2em;
    color: #aaa;
}
.summary strong {
    color: #00acc1;
    font-size: 1.3em;
}

/* Chart & Stat Styles */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
    margin: 40px 0;
}
.stat-card {
    background-color: #1e1e1e;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.stat-card h3 {
    color: #aaa;
    font-size: 1em;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.stat-card .value {
    color: #00acc1;
    font-size: 2.5em;
    font-weight: bold;
}
.stat-card .detail {
    font-size: 0.9em;
    color: #777;
}
.chart-container {
    position: relative;
    margin: 40px auto;
    height: 400px;
    max-width: 500px;
}
.wide-chart-container {
    position: relative;
    margin: 50px auto;
    height: 400px;
    max-width: 1000px;
}
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}
.edition-chart-container {
    position: relative;
    height: 300px;
}
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
}
.breakdown-chart-container {
    position: relative;
    height: 350px;
}
.heatmap-container {
    margin: 50px 0;
}

.random-problem-container {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #1e1e1e;
    border-radius: 8px;
    border: 1px solid #333;
}

#random-problem-btn {
    background-color: #00838f;
    color: #ffffff;
    border: none;
    padding: 12px 25px;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#random-problem-btn:hover {
    background-color: #00acc1;
}

#random-problem-btn:active {
    transform: scale(0.98);
}

.random-problem-display-card {
    margin-top: 20px;
    padding: 15px;
    background-color: #242424;
    border-left: 5px solid #00acc1;
    text-align: left;
}

.random-problem-display-card h3 {
    margin: 0 0 10px 0;
    color: #e0e0e0;
    text-align: left;
}

.random-problem-display-card p {
    margin: 0;
    font-size: 1.1em;
}

.random-problem-display-card strong {
    color: #80deea;
}

.random-problem-display-card span {
    color: #aaa;
    font-size: 0.9em;
    margin-left: 10px;
}
