body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #f0f4f8;
    color: #333;
}

.container {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 40px;
    text-align: center;
    max-width: 800px;
    width: 100%;
}

h1 {
    color: #2c3e50;
    margin-bottom: 30px;
}

.intersection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.direction {
    background-color: #ecf0f1;
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.direction:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.traffic-light {
    display: flex;
    flex-direction: column;
    background-color: #34495e;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
}

.light {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin: 5px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.light.red { background-color: #e74c3c; }
.light.yellow { background-color: #f1c40f; }
.light.green { background-color: #2ecc71; }

.light.active {
    opacity: 1;
    box-shadow: 0 0 10px currentColor;
}

.info {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #2c3e50;
}

.count {
    font-size: 24px;
    font-weight: 300;
    color: #3498db;
}

.controls {
    margin-top: 30px;
}

button {
    margin: 10px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2980b9;
}

#log {
    margin-top: 30px;
    height: 150px;
    overflow-y: auto;
    border: 1px solid #bdc3c7;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    background-color: #f9f9f9;
}

#log p {
    margin: 5px 0;
    color: #7f8c8d;
    font-size: 14px;
}

#log {
    margin-top: 30px;
    height: 200px;
    overflow-y: auto;
    border: 1px solid #bdc3c7;
    border-radius: 10px;
    padding: 15px;
    text-align: left;
    background-color: #2c3e50;
    color: #ecf0f1;
    font-family: 'Courier New', monospace;
}

.log-entry {
    margin: 5px 0;
    padding: 5px;
    border-bottom: 1px solid #34495e;
    transition: background-color 0.3s ease;
}

.log-entry:hover {
    background-color: #34495e;
}

.log-time {
    color: #3498db;
    margin-right: 10px;
}

/* Scrollbar styling */
#log::-webkit-scrollbar {
    width: 8px;
}

#log::-webkit-scrollbar-track {
    background: #34495e;
}

#log::-webkit-scrollbar-thumb {
    background: #95a5a6;
    border-radius: 4px;
}

#log::-webkit-scrollbar-thumb:hover {
    background: #7f8c8d;
}