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

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c3e50;
    background-color: #ffffff;
}

/* Header */
header {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 2rem 0;
    text-align: center;
}

.logo {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
}

.tagline {
    font-size: 1rem;
    font-weight: 300;
    opacity: 0.9;
    font-style: italic;
}

/* Container */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Test Section */
.test-section {
    padding: 3rem 0;
}

.test-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    text-align: center;
    border-bottom: 3px dotted #8B4513;
    padding-bottom: 10px;
}

.instrukcja {
    background-color: #f8f8f8;
    padding: 1.5rem;
    border-left: 3px solid #1a1a1a;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.ostrzezenie {
    background-color: #fff5f5;
    padding: 1.5rem;
    border-left: 3px solid #dc3545;
    margin-bottom: 2rem;
    line-height: 1.8;
    color: #dc3545;
}

.progress-bar {
    background-color: #e0e0e0;
    height: 30px;
    border-radius: 5px;
    margin-bottom: 2rem;
    overflow: hidden;
}

.progress-fill {
    background-color: #1a1a1a;
    height: 100%;
    width: 0%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

/* Question Table */
.questions-table {
    width: 100%;
    margin-bottom: 2rem;
}

.question-row {
    display: grid;
    grid-template-columns: 50px repeat(4, 1fr);
    gap: 10px;
    padding: 15px 10px;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.2s ease;
}

.question-row:nth-child(even) {
    background-color: #f8f8f8;
}

.question-row:hover {
    background-color: #e8e8e8;
}

.question-number {
    font-weight: bold;
    color: #1a1a1a;
    display: flex;
    align-items: center;
}

.answer-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.answer-option:hover {
    background-color: rgba(0,0,0,0.05);
}

.answer-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.answer-option label {
    cursor: pointer;
    flex: 1;
    font-size: 0.95rem;
}

/* Buttons */
.button-container {
    text-align: center;
    margin: 3rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    padding: 1rem 3rem;
    background-color: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #777777;
    transform: translateY(-2px);
}

.cta-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.reset-button {
    background-color: #54a4db;
}

.reset-button:hover {
    background-color: #0e4d79;
}

/* Results Page */
.results-section {
    padding: 3rem 0;
}

.results-title {
    font-size: 2rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #1a1a1a;
    text-align: center;
}

.results-table {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.results-table th {
    padding: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    border: 2px solid #ddd;
}

.results-table td {
    padding: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    border: 2px solid #ddd;
}

.category-d {
    background-color: #ffebee;
    color: #c62828;
}

.category-i {
    background-color: #fff9c4;
    color: #f57f17;
}

.category-s {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.category-c {
    background-color: #e3f2fd;
    color: #1565c0;
}

.explanation-section {
    margin-top: 3rem;
    padding: 2rem;
    background-color: #f8f8f8;
    border-left: 3px solid #1a1a1a;
}

.explanation-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.personality-type {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 5px;
}

.personality-type h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.type-d h4 { color: #c62828; }
.type-i h4 { color: #f57f17; }
.type-s h4 { color: #2e7d32; }
.type-c h4 { color: #1565c0; }

/* Footer */
footer {
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.copyright {
    font-size: 0.9rem;
    opacity: 0.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo {
        font-size: 2rem;
    }

    .question-row {
        grid-template-columns: 40px 1fr;
        gap: 5px;
    }

    .answer-option {
        margin-bottom: 10px;
    }

    .results-table th,
    .results-table td {
        padding: 1rem;
        font-size: 1rem;
    }

    .results-table td {
        font-size: 1.5rem;
    }

    .button-container {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        max-width: 300px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}
