body {
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
    background:lightgray;
    min-height:100vh;
    margin:0;
    color:#333;
}

.header-section {
    background:rgba(255,255,255,0.95);
    backdrop-filter:blur(10px);
    border-bottom:1px solid rgba(0,0,0,0.1);
    padding:12px 0;
    position:sticky;
    top:0;
    z-index:1000;
}

.page-title {
    font-size:1.5rem;
    font-weight:600;
    color:#2575fc;
    margin:0;
    display:flex;
    align-items:center;
    gap:10px;
}

.page-title i {
    color:#2575fc;
    font-size:1.3rem;
}

.page-description {
    background:rgba(255,255,255,0.95);
    border-radius:12px;
    box-shadow:0 4px 20px rgba(0,0,0,0.1);
    padding:20px;
    margin:20px 0;
    backdrop-filter:blur(10px);
    border:1px solid rgba(0,0,0,0.08);
}

.page-description p {
    font-size:16px;
    line-height:1.6;
    color:#495057;
    margin-bottom:20px;
}

.keywords-badges {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
}

.badge-item {
    background:linear-gradient(135deg,#e0e7ff 0%,#c7d2fe 100%);
    color:#4f46e5;
    padding:6px 12px;
    border-radius:20px;
    font-size:13px;
    font-weight:500;
    display:flex;
    align-items:center;
    gap:6px;
    border:1px solid rgba(79,70,229,0.2);
}

.unified-toolbar {
    background:rgba(255,255,255,0.98);
    border:1px solid rgba(0,0,0,0.08);
    border-radius:12px;
    box-shadow:0 4px 20px rgba(0,0,0,0.08);
    margin:20px 0;
    overflow:hidden;
    backdrop-filter:blur(10px);
}

.toolbar-header {
    background:linear-gradient(135deg,#f8f9fa 0%,#e9ecef 100%);
    padding:10px 20px;
    border-bottom:1px solid rgba(0,0,0,0.06);
    display:flex;
    justify-content:space-between;
    align-items:center;
    flex-wrap:wrap;
    gap:15px;
}

.toolbar-title {
    font-weight:600;
    color:#495057;
    display:flex;
    align-items:center;
    gap:8px;
}

.toolbar-stats {
    display:flex;
    gap:20px;
    font-size:13px;
    color:#6c757d;
}

.stat-item {
    display:flex;
    align-items:center;
    gap:5px;
    font-weight:500;
}

.stat-value {
    background:rgba(37,117,252,0.1);
    color:#2575fc;
    padding:2px 8px;
    border-radius:12px;
    font-weight:600;
    min-width:30px;
    text-align:center;
}

.toolbar-content {
    padding:15px 20px;
    display:flex;
    flex-wrap:wrap;
    gap:15px;
    align-items:center;
    justify-content:space-between;
}

.input-section {
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}

.page-replacement-input {
    height:36px;
    border:2px solid #dee2e6;
    border-radius:8px;
    padding:0 12px;
    font-size:14px;
    font-weight:500;
    transition:all 0.2s ease;
}

.page-replacement-input:focus {
    outline:none;
    border-color:#2575fc;
    box-shadow:0 0 0 3px rgba(37,117,252,0.1);
}

.algorithm-select {
    width:220px;
    background:white;
}

.operations-section {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.toolbar-btn {
    height:36px;
    padding:0 16px;
    border:1px solid transparent;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:6px;
    transition:all 0.2s ease;
    white-space:nowrap;
    min-width:80px;
    justify-content:center;
}

.toolbar-btn:hover {
    transform:translateY(-1px);
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.toolbar-btn:active {
    transform:translateY(0);
}

.toolbar-btn i {
    font-size:14px;
}

.btn-access {
    background:linear-gradient(135deg,#2575fc,#6a11cb);
    color:white;
    border-color:#2575fc;
}

.btn-simulate {
    background:linear-gradient(135deg,#10b981,#059669);
    color:white;
    border-color:#10b981;
}

.btn-clear {
    background:linear-gradient(135deg,#6c757d,#495057);
    color:white;
    border-color:#6c757d;
}

.btn-demo {
    background:linear-gradient(135deg,#f59e0b,#d97706);
    color:white;
    border-color:#f59e0b;
}

.main-content {
    background:rgba(255,255,255,0.98);
    border-radius:12px;
    box-shadow:0 8px 25px rgba(0,0,0,0.08);
    margin:20px 0;
    overflow:hidden;
    backdrop-filter:blur(10px);
}

.content-grid {
    display:grid;
    gap:0;
    min-height:600px;
}

.visualization-panel {
    padding:30px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    background:linear-gradient(135deg,#f0f4ff 0%,#e0e7ff 100%);
}

.algorithm-diagram-container {
    width:100%;
    max-width:900px;
    border:3px solid #8b5cf6;
    border-radius:12px;
    background:rgba(255,255,255,0.9);
    padding:20px;
    margin-bottom:30px;
}

.diagram-container {
    display:flex;
    flex-wrap:wrap;
    gap:20px;
    justify-content:center;
    margin-top:15px;
}

.step-diagram {
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    flex:1;
    min-width:150px;
}

.step-number {
    width:40px;
    height:40px;
    background:linear-gradient(135deg,#8b5cf6,#6a11cb);
    color:white;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
    font-size:18px;
    margin-bottom:10px;
}

.step-content h6 {
    margin:0 0 8px 0;
    color:#6a11cb;
    font-size:16px;
}

.step-content p {
    margin:0;
    font-size:13px;
    color:#495057;
}

.memory-container {
    width:100%;
    max-width:900px;
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:30px;
    margin-bottom:30px;
}

.memory-section {
    border:3px solid #2575fc;
    border-radius:12px;
    background:rgba(255,255,255,0.9);
    overflow:hidden;
}

.memory-header {
    background:linear-gradient(135deg,#2575fc,#6a11cb);
    color:white;
    padding:12px 15px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    font-weight:600;
}

.memory-stats {
    background:rgba(255,255,255,0.2);
    padding:2px 10px;
    border-radius:12px;
    font-size:13px;
}

.page-frames,.virtual-pages {
    padding:15px;
    min-height:200px;
}

.page-frame-item {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 15px;
    margin:5px 0;
    border-radius:8px;
    font-size:14px;
    font-weight:500;
    transition:all 0.3s ease;
    background:linear-gradient(135deg,#dbeafe,#bfdbfe);
    color:#1e40af;
    border:1px solid #93c5fd;
}

.page-frame-item.occupied {
    background:linear-gradient(135deg,#fecaca,#fca5a5);
    color:#991b1b;
    border:1px solid #f87171;
    animation:pulseFrame 1s;
}

.virtual-page-item {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 15px;
    margin:5px 0;
    border-radius:8px;
    font-size:14px;
    font-weight:500;
    transition:all 0.3s ease;
    background:linear-gradient(135deg,#dcfce7,#bbf7d0);
    color:#166534;
    border:1px solid #86efac;
}

.virtual-page-item.in-memory {
    background:linear-gradient(135deg,#ddd6fe,#c4b5fd);
    color:#5b21b6;
    border:1px solid #a78bfa;
    animation:pulsePage 1s;
}

.page-table-container {
    width:100%;
    max-width:900px;
    border:3px dashed #dee2e6;
    border-radius:12px;
    background:rgba(255,255,255,0.8);
    padding:20px;
    margin-bottom:20px;
}

.page-table {
    width:100%;
    border-collapse:collapse;
    background:white;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 4px 12px rgba(0,0,0,0.1);
}

.page-table th,.page-table td {
    padding:12px;
    text-align:center;
    border-bottom:1px solid #dee2e6;
}

.page-table th {
    background:#2575fc;
    color:white;
    font-weight:600;
}

.page-table tr:hover {
    background:#f8f9fa;
}

.page-table .valid-true {
    color:#16a34a;
    font-weight:600;
}

.page-table .valid-false {
    color:#dc2626;
    font-weight:600;
}

.algorithm-visualization {
    width:100%;
    max-width:900px;
    border:3px solid #10b981;
    border-radius:12px;
    background:rgba(240,253,244,0.9);
    padding:20px;
    margin-bottom:20px;
}

.algorithm-step {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:12px;
    margin:8px 0;
    background:white;
    border-radius:8px;
    box-shadow:0 2px 8px rgba(0,0,0,0.1);
    border-left:4px solid #10b981;
}

.algorithm-step.fault {
    border-left:4px solid #ef4444;
    background:#fff0f0;
}

.algorithm-step.replacement {
    border-left:4px solid #f59e0b;
    background:#fffbeb;
}

.log-panel {
    background:#f8f9fa;
    border-left:1px solid #dee2e6;
    display:flex;
    flex-direction:column;
}

.log-header {
    background:#e9ecef;
    padding:15px 20px;
    border-bottom:1px solid #dee2e6;
    font-weight:600;
    color:#495057;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.log-content {
    flex:1;
    padding:15px 20px;
    overflow-y:auto;
    max-height:400px;
    font-family:'Courier New',monospace;
    font-size:13px;
    line-height:1.6;
}

.log-entry {
    padding:5px 0;
    border-bottom:1px solid rgba(0,0,0,0.05);
    color:#495057;
}

.log-entry.success {
    color:#16a34a;
}

.log-entry.error {
    color:#dc2626;
}

.log-entry.info {
    color:#2575fc;
}

.log-entry.warning {
    color:#f59e0b;
}

.empty-state {
    text-align:center;
    color:#adb5bd;
    font-style:italic;
    padding:40px 20px;
}

.comparison-panel {
    border-top:1px solid #dee2e6;
    padding:15px 20px;
}

.comparison-panel h6 {
    margin-top:0;
    color:#495057;
    display:flex;
    align-items:center;
    gap:8px;
}

.comparison-content {
    display:flex;
    flex-direction:column;
    gap:10px;
}

.comparison-item {
    display:flex;
    justify-content:space-between;
    padding:8px 12px;
    background:white;
    border-radius:6px;
    box-shadow:0 2px 4px rgba(0,0,0,0.05);
    font-size:13px;
}

.comparison-item span:first-child {
    font-weight:600;
    color:#495057;
}

.comparison-item span:last-child {
    color:#6c757d;
}

@keyframes pulseFrame {
    0%,100% {
    transform:scale(1);
}

50% {
    transform:scale(1.03);
}


}

@keyframes pulsePage {
    0%,100% {
    transform:scale(1);
}

50% {
    transform:scale(1.03);
}


}

@media (max-width:992px) {
    .content-grid {
    grid-template-columns:1fr;
}

.log-panel {
    border-left:none;
    border-top:1px solid #dee2e6;
}

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

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

.step-diagram {
    width:100%;
    max-width:300px;
}


}