/** OVERALL STYLE **/

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e8e8e8;
    line-height: 1.6;
}

.theme-colors {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f35 100%);
    color: #f0f0f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.theme-colors a {
    color: #5fd4ff;
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
}

.theme-colors a:visited {
    color: #9c88ff;
}

.theme-colors a:hover {
    color: #a8e6ff;
    text-decoration: underline;
}

.header {
    padding: 1.5rem 2rem;
    line-height: 1.8;
    border-bottom: 2px solid rgba(79, 195, 247, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.branding {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

/** SEARCH BAR **/

.search-container {
    position: relative;
    max-width: 600px;
    width: 100%;
    margin: 0.5rem 0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(79, 195, 247, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-family: inherit;
    transition: all 0.3s ease;
    outline: none;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4fc3f7;
    box-shadow: 0 0 0 3px rgba(79, 195, 247, 0.2);
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    pointer-events: none;
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none;
}

.search-clear:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.search-clear.visible {
    display: block;
}

.search-results-count {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.search-highlight {
    background: rgba(255, 235, 59, 0.4);
    padding: 0.1em 0.2em;
    border-radius: 3px;
    font-weight: 600;
}

li.search-match {
    background: rgba(79, 195, 247, 0.15);
    border-left: 3px solid #4fc3f7;
    padding-left: 0.8rem;
}

li.search-hidden {
    display: none;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.breadcrumb-part {
    color: #5fd4ff;
    transition: color 0.2s ease;
}

.breadcrumb-part:visited {
    color: #bb99ff;
}

.breadcrumb-part:hover {
    color: #a8e6ff;
}

.breadcrumbs b {
    color: #666;
    margin: 0 0.2rem;
}

.footer {
    padding: 1.5rem 2rem;
    box-sizing: border-box;
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 2px solid rgba(79, 195, 247, 0.2);
    text-align: center;
    font-size: 0.9rem;
}

.main {
    padding: 2rem 2rem 8rem 2rem;
    max-width: 60rem;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.03);
    min-height: calc(100vh - 200px);
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(79, 195, 247, 0.3);
}

ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

li {
    line-height: 1.8;
    list-style-image: none;
    margin: 0.5rem 0;
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

li:hover {
    background-color: rgba(79, 195, 247, 0.1);
}

li a {
    color: #5fd4ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

li a:visited {
    color: #bb99ff;
}

li a:hover {
    color: #a8e6ff;
    text-decoration: none;
}

/** FOLDERS **/

.folder-icon {
    height: 20px;
    width: 20px;
    margin-right: 8px;
    vertical-align: middle;
    opacity: 0.8;
}

.li-folder {
    list-style-image: url('icons/folder.svg');
    padding-left: 0.5rem;
}

.li-folder.li-folder-open {
    list-style-image: url('icons/folder-open.svg');
}

.hidden {
    display: none;
}

.selected {
    background: rgba(255, 152, 0, 0.3) !important;
    border-left: 3px solid #ff9800;
    padding-left: 0.8rem;
}

/** INDENTATION **/

.indent-1 {
    white-space: pre;
    tab-size: 2;
}

.indent-2 {
    white-space: pre;
    tab-size: 4;
}

.indent-3 {
    white-space: pre;
    tab-size: 6;
}

.indent-4 {
    white-space: pre;
    tab-size: 8;
}

.indent-5 {
    white-space: pre;
    tab-size: 10;
}

.indent-6 {
    white-space: pre;
    tab-size: 12;
}

.indent-7 {
    white-space: pre;
    tab-size: 14;
}

.indent-8 {
    white-space: pre;
    tab-size: 16;
}

.indent-9 {
    white-space: pre;
    tab-size: 18;
}

.indent-right-align {
    white-space: pre;
    tab-size: 100;
}

/** HIGHLIGHTED REGIONS **/

.oxe-image {
    position: relative;
    display: inline-block;
    max-width: none;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.oxe-region {
    position: absolute;
    display: block;
    background: rgba(79, 195, 247, 0.4);
    border: 2px solid #4fc3f7;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.oxe-region:hover {
    background: rgba(79, 195, 247, 0.6);
}

/** TABLES **/

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

td, th {
    border: 1px solid rgba(79, 195, 247, 0.2);
    padding: 0.8rem;
    text-align: left;
}

th {
    background: rgba(79, 195, 247, 0.2);
    color: #ffffff;
    font-weight: 600;
}

tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

tr:hover {
    background: rgba(79, 195, 247, 0.1);
}

/** BUTTONS **/

button {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: #0f1419;
    border: none;
    padding: 0.7rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin: 0.5rem 0.5rem 0.5rem 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 195, 247, 0.3);
    font-family: inherit;
}

button:hover {
    background: linear-gradient(135deg, #5fc5f8 0%, #39baf7 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.4);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(79, 195, 247, 0.3);
}

/** ABOUT PAGE **/

.about-body {
    padding: 2rem 5vw;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
}

.about-h1 {
    font-size: 5rem;
    font-weight: 700;
    margin: 2rem 0;
    background: linear-gradient(135deg, #4fc3f7 0%, #81d4fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.about-h1 a {
    text-decoration: none;
    background: linear-gradient(135deg, #4fc3f7 0%, #81d4fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    line-height: 1.8;
    min-width: 6rem;
    max-width: 100%;
    width: 35rem;
    font-size: 1.2em;
    margin-bottom: 2rem;
    margin-left: 3vw;
    text-align: justify;
    color: #e0e0e0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 3px solid #4fc3f7;
}

.about-content a {
    color: #5fd4ff;
    text-decoration: none;
    font-weight: 500;
}

.about-content a:visited {
    color: #bb99ff;
}

.about-content a:hover {
    color: #a8e6ff;
    text-decoration: underline;
}

/** IMAGE MODAL/LIGHTBOX **/

.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    position: relative;
    width: 98vw;
    height: 96vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

.image-modal-img-container {
    width: 98vw;
    height: 90vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.image-modal-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    transition: transform 0.1s ease-out;
    cursor: zoom-in;
    user-select: none;
}

.image-modal-close {
    position: fixed;
    top: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    line-height: 1;
    z-index: 10001;
    border: 2px solid rgba(79, 195, 247, 0.4);
}

.image-modal-close:hover {
    background: rgba(79, 195, 247, 0.3);
    border-color: #4fc3f7;
    transform: rotate(90deg);
}

.image-modal-controls {
    position: fixed;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.image-zoom-btn {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(79, 195, 247, 0.4);
    color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.image-zoom-btn:hover {
    background: rgba(79, 195, 247, 0.3);
    border-color: #4fc3f7;
    transform: scale(1.1);
}

.image-zoom-btn:active {
    transform: scale(0.95);
}

.zoom-reset {
    font-size: 28px;
    line-height: 1;
}

.image-modal-caption {
    color: #e0e0e0;
    padding: 10px 20px;
    text-align: center;
    font-size: 0.9rem;
    max-width: 90vw;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    border-radius: 20px;
    z-index: 10001;
}

/* Make images in main content have a hover effect */
.main img:not(.folder-icon),
.oxe-image img,
img.big-img {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.main img:not(.folder-icon):hover,
.oxe-image img:hover,
img.big-img:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(79, 195, 247, 0.4);
}

/** RESPONSIVE DESIGN **/

@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }
    
    .main {
        padding: 1.5rem 1rem 8rem 1rem;
        margin: 0.5rem;
    }
    
    .footer {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .breadcrumbs {
        font-size: 0.8rem;
    }
    
    .about-h1 {
        font-size: 3rem;
    }
    
    .about-content {
        width: 100%;
        margin-left: 0;
        font-size: 1em;
    }
    
    button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-input {
        font-size: 0.9rem;
        padding: 0.65rem 0.9rem 0.65rem 2.5rem;
    }
    
    .image-modal-content {
        width: 100vw;
        height: 100vh;
    }
    
    .image-modal-img-container {
        width: 100vw;
        height: 92vh;
    }
    
    .image-modal-img {
        max-height: 92vh;
    }
    
    .image-modal-close {
        top: 10px;
        right: 10px;
        font-size: 32px;
        width: 42px;
        height: 42px;
    }
    
    .image-modal-controls {
        top: 10px;
        left: 10px;
        flex-direction: column;
    }
    
    .image-zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .zoom-reset {
        font-size: 24px;
    }
    
    .image-modal-caption {
        font-size: 0.8rem;
        padding: 8px 15px;
        max-width: 95vw;
    }
}
