* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Inter, sans-serif;
}

@supports (font-variation-settings: normal) {
    :root { font-family: Inter, sans-serif; }
}

body {
    background: url('../landing.jpeg') no-repeat center center fixed;
    background-size: cover;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background-color: rgba(0, 0, 0, 0.35);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(15px);
    position: relative;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
}

h2 {
    margin-bottom: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

h3 {
    margin-bottom: 10px;
    color: #f0f0f0;
}

.input-section {
    margin: 50px auto 40px;
    max-width: 800px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 25px;
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.input-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

label {
    font-weight: bold;
    color: #d0d0d0;
}

input {
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    width: 120px;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: #00e0ff;
}

button {
    padding: 10px 15px;
    background-color: rgba(0, 224, 255, 0.8);
    color: #000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

button:hover {
    background-color: rgba(0, 224, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 224, 255, 0.4);
}

#run-algorithm {
    margin: 20px 0;
    padding: 12px 20px;
    font-size: 16px;
    background-color: rgba(15, 157, 88, 0.8);
}

#run-algorithm:hover {
    background-color: rgba(15, 157, 88, 1);
}

.matrix-container {
    max-width: 900px;
    margin: 30px auto;
}

.matrix-section {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    transition: transform 0.3s ease;
    margin-bottom: 25px;
}

.matrix-section:hover {
    transform: translateY(-5px);
}

.matrix, .resource-vector {
    overflow-x: auto;
}

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

th, td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    text-align: center;
}

th {
    background-color: rgba(0, 224, 255, 0.2);
    font-weight: bold;
    color: #fff;
}

.result-box {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
}

#system-state {
    font-size: 18px;
    font-weight: bold;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.safe {
    background-color: rgba(15, 157, 88, 0.3);
    color: #d4edda;
    border: 1px solid rgba(15, 157, 88, 0.5);
}

.unsafe {
    background-color: rgba(219, 68, 55, 0.3);
    color: #f8d7da;
    border: 1px solid rgba(219, 68, 55, 0.5);
}

#step-execution {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    max-height: none;
    overflow-y: visible;
}

.step {
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #00e0ff;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0 8px 8px 0;
    backdrop-filter: blur(5px);
}

.process-granted {
    border-left-color: rgba(15, 157, 88, 1);
}

.process-denied {
    border-left-color: rgba(219, 68, 55, 1);
}

.hidden {
    display: none;
}

input.error {
    border-color: rgba(219, 68, 55, 0.8);
    background-color: rgba(219, 68, 55, 0.1);
}

/* Back button styles */
.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 224, 255, 0.7);
    color: #000;
    border: none;
    border-radius: 8px;
    padding: 8px 15px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
    z-index: 10;
    text-decoration: none;
}

.back-button:hover {
    background-color: rgba(0, 224, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 224, 255, 0.4);
}

.back-button i {
    font-size: 14px;
}

/* How to use button */
.how-to-use-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.how-to-use-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: rgba(30, 30, 30, 0.95);
    max-width: 700px;
    width: 90%;
    height: 90%;
    border-radius: 16px;
    padding: 40px 30px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #fff;
    backdrop-filter: blur(50px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
}

.modal-content h2 {
    position: sticky;
    top: 0;
    background-color: rgba(30, 30, 30, 0.95);
    padding-top: 10px;
    margin-top: -10px;
    z-index: 5;
}

.modal-close {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 10;
    background-color: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
    color: white;
    font-size: 28px;
    font-weight: 300;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
    color: #00e0ff;
}

.modal h2 {
    color: #00e0ff;
    border-bottom: 1px solid rgba(0, 224, 255, 0.3);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.modal p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.modal-section {
    padding: 5px;
}

.modal-section h3 {
    color: #00e0ff;
    margin-bottom: 10px;
}

.modal-section ol, .modal-section ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-section li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Button styling improvements */
#generate-tables, #load-demo {
    min-width: 150px;
    padding: 12px 20px;
}

/* Custom scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 224, 255, 0.3);
    border-radius: 10px;
    border: 2px solid rgba(30, 30, 30, 0.8);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 224, 255, 0.5);
}

/* Theory Section Styling */
.theory-section {
    background-color: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theory-section h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.theory-section h3 {
    color: #34495e;
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem 0;
}

.theory-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 1.2rem;
}

.theory-section ul, .theory-section ol {
    padding-left: 2rem;
    margin: 1rem 0;
}

.theory-section li {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
    color: #2c3e50;
}

.theory-section strong {
    color: #2980b9;
    font-weight: 600;
}

/* Emoji and symbol styling */
.theory-section li:has(strong) {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Additional spacing for Coffman conditions */
.theory-section ol li {
    padding: 0.5rem 0;
}

/* Hover effects */
.theory-section li:hover {
    background-color: #f1f5f9;
    transform: translateX(5px);
    transition: all 0.2s ease;
} 