﻿#langSwitcher {
  background-color: #070707;
  color: #0066cc;
  font-family: monospace;
  font-size: 12px;
  border: 1px solid #0033ff;
  padding: 4px 8px;
  cursor: pointer;
}

html { scrollbar-width: none; }

body {
	background-color: #070707;
	color: #0033ff;
	font-family: monospace;
	font-size: 12px;
	margin: 0;
	padding: 0;
	background-image: url('/assets/images/bg.png');
	background-repeat: repeat;
}

h1 { font-variant: small-caps; border-bottom: 1px dashed; }
h3 { white-space: pre-wrap; word-wrap: break-word; }
p { white-space: pre-wrap; word-wrap: break-word; }

a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }

.sidebar {
    width: 256px;
    min-height: 100%;
    border-right: 5px solid #0033ff;
    padding: 16px 16px;
    position: absolute;
    overflow: auto;
    box-sizing: border-box;
}
.sidebar-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 10px;
}

.title {
	font-size: 32px;
	letter-spacing: 4px;
	font-variant: small-caps;
	line-height: 0.7;
}

.subtitle { margin-bottom: 24px; font-style: italic; }

.menu a {
	border: 1px solid #0033ff;
	text-decoration: none;
	padding: 4px;
	display: inline-block;
	margin-bottom: 6px;
}
.menu a:hover { font-weight: bold; }

.catalog { font-size: 14px; }
.catalog-toggle {
	display: inline-block;
	width: 12px;
	height: 12px;
	line-height: 10px;
	text-align: center;
	cursor: pointer;
	color: #0033ff;
	font-size: 16px;
	user-select: none;
	vertical-align: middle;
	transition: transform 0.15s;
}
.catalog-toggle::before {
	content: ">";
	display: inline-block;
	transition: transform 0.15s;
}
.catalog-folder.expanded > .catalog-toggle::before { transform: rotate(90deg); }
.catalog-toggle-placeholder {
	display: inline-block;
	width: 12px;
	height: 12px;
	vertical-align: middle; 
}
.catalog-folder > a:hover { text-decoration: underline; }
.catalog-folder > .catalog {
	margin-left: 16px;
	border-left: 1px dashed #0033ff;
	padding-left: 6px;
	margin-top: 2px;
	margin-bottom: 2px;
}
.catalog-folder > .catalog.hidden { display: none; }

iframe {
	height: 100%;
	width: 100%;
	border: none;
}

.main {
    position: absolute;
    height: 950px;
    width: calc(100% - 293px);
    margin-left: 293px;
    box-sizing: border-box;
}

.page { padding: 24px; }


.folder-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.folder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 128px;
    cursor: pointer;
}

.folder-card:hover { text-decoration: none; }

.folder-box {
    width: 128px;
    height: 128px;
    border: 2px solid #0033ff;
    background-color: rgba(0, 51, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.folder-box img {
    width: 80px;
    height: 80px;
    image-rendering: pixelated;
}

.folder-name-box {
    width: 128px;
    margin-top: 6px;
    border: 1px solid #0033ff;
    background-color: #070707;
    color: #0033ff;
    font-family: monospace;
    font-size: 11px;
    text-align: center;
    padding: 4px 2px;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
}

.folder-card:hover .folder-box {
    background-color: rgba(0, 51, 255, 0.2);
    border-color: #0066cc;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.5);
}
.folder-card:hover .folder-name-box {
    color: #0066cc;
    border-color: #0066cc;
}

.folder-box img.file-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
  body:has(.sidebar) {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100vh;
  }


  body:not(:has(.sidebar)) {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100%;
  }


  .sidebar {
    position: relative;
    width: 100%;
    height: 40vh;
    min-height: 200px;
    border-right: none;
    border-bottom: 5px solid #0033ff;
    top: auto;
    left: auto;
  }

  .main {
    margin-left: 0;
    width: 100%;
    height: 60vh;
  }

  .page {
    padding: 16px;
    box-sizing: border-box;
  }

  .folder-list {
    gap: 12px;
    justify-content: center;
  }
  
  .folder-card {
    width: 100px;
  }

  .folder-box {
    width: 100px;
    height: 100px;
  }

  .folder-box img {
    width: 60px;
    height: 60px;
  }

  .folder-name-box {
    width: 100px;
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  body:has(.sidebar) .sidebar {
    height: 35vh;
  }
  
  body:has(.sidebar) .main {
    height: 65vh;
  }

  .folder-list {
    gap: 8px;
  }

  .folder-card {
    width: 88px;
  }

  .folder-box {
    width: 88px;
    height: 88px;
  }

  .folder-box img {
    width: 50px;
    height: 50px;
  }

  .folder-name-box {
    width: 88px;
    font-size: 9px;
    padding: 3px 1px;
  }
}