:root {
    --primary-white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --dark-gray: #6c757d;
    --darker-gray: #495057;
    --accent-gray: #343a40;
    --text-color: #212529;
    --border-color: #dee2e6;
    --red: #dc3545;
    --green: #28a745;
    --blue: #007bff;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    background-color: var(--primary-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-gray);
    display: flex;
    align-items: center;
}

.logo i {
    margin-right: 10px;
}

/* Main Content */
.main-content {
    background-color: var(--primary-white);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-section h1 {
    font-size: 2.5rem;
    color: var(--accent-gray);
    margin-bottom: 20px;
}

.welcome-section p {
    font-size: 1.1rem;
    color: var(--dark-gray);
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-gray);
    color: var(--primary-white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: var(--darker-gray);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-gray);
    border: 2px solid var(--accent-gray);
}

.btn-outline:hover {
    background-color: var(--accent-gray);
    color: var(--primary-white);
}

/* Setup Section */
.setup-section {
    display: none;
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--darker-gray);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    background-color: var(--primary-white);
    color: var(--text-color);
    font-size: 1rem;
}

.instructions {
    background-color: var(--light-gray);
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.instructions h3 {
    color: var(--accent-gray);
    margin-bottom: 15px;
}

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

.instructions li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.instructions li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--dark-gray);
}

/* Test Section */
.test-section {
    display: none;
}

.polygraph-display {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.graphs-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.graph-box {
    background-color: var(--primary-white);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.graph-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.graph-title i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.graph-title h3 {
    color: var(--darker-gray);
    font-size: 1.1rem;
}

.graph-canvas {
    width: 100%;
    height: 150px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background-color: var(--primary-white);
}

.question-box {
    background-color: var(--primary-white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.question-box h2 {
    color: var(--accent-gray);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.question-number {
    display: inline-block;
    background-color: var(--medium-gray);
    color: var(--darker-gray);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.answer-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.answer-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    min-width: 150px;
}

.answer-btn.true {
    background-color: var(--green);
}

.answer-btn.true:hover {
    background-color: #218838;
}

.answer-btn.false {
    background-color: var(--red);
}

.answer-btn.false:hover {
    background-color: #c82333;
}

/* Results Section */
.results-section {
    display: none;
    text-align: center;
}

.result-header {
    margin-bottom: 40px;
}

.result-header h2 {
    font-size: 2.5rem;
    color: var(--accent-gray);
    margin-bottom: 15px;
}

.result-summary {
    background-color: var(--light-gray);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.result-summary h3 {
    color: var(--darker-gray);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.deception-indicator {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.2rem;
    margin: 20px 0;
}

.deception-indicator.truthful {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--green);
    border: 2px solid var(--green);
}

.deception-indicator.deceptive {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--red);
    border: 2px solid var(--red);
}

.deception-indicator.inconclusive {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 2px solid #ffc107;
}

.question-results {
    text-align: left;
    margin-top: 30px;
}

.question-result-item {
    background-color: var(--primary-white);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.question-text {
    flex: 1;
}

.question-text strong {
    color: var(--darker-gray);
}

.result-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.result-badge.truthful {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--green);
}

.result-badge.deceptive {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--red);
}

.result-badge.inconclusive {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

/* Footer */
footer {
    background-color: var(--accent-gray);
    color: var(--primary-white);
    padding: 30px 0;
    text-align: center;
    margin-top: 50px;
}

.copyright {
    font-size: 0.9rem;
    color: var(--light-gray);
}

/* Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }

    .welcome-section h1 {
        font-size: 2rem;
    }

    .graphs-container {
        grid-template-columns: 1fr;
    }

    .answer-buttons {
        flex-direction: column;
        align-items: center;
    }

    .answer-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.recording {
    animation: pulse 2s infinite;
  }
