/* FlashZone & SoftwareVault - Retro 2006 Stylesheet */

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #c0c0c0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='4' height='4' fill='%23c0c0c0'/%3E%3Crect width='1' height='1' fill='%23b0b0b0'/%3E%3Crect x='2' y='2' width='1' height='1' fill='%23b0b0b0'/%3E%3C/svg%3E");
    font-family: Tahoma, Verdana, Arial, sans-serif;
    font-size: 12px;
    color: #000000;
    min-width: 800px;
}

a {
    color: #0033cc;
    text-decoration: none;
}

a:hover {
    color: #ff6600;
    text-decoration: underline;
}

/* ===== HEADER ===== */
.header {
    background: #000066;
    background: linear-gradient(to bottom, #003399 0%, #000066 50%, #000044 100%);
    padding: 8px 12px;
    border-bottom: 3px solid #ff6600;
}

.header-logo {
    width: 280px;
    vertical-align: middle;
}

.logo-link {
    font-family: 'Comic Sans MS', 'Chalkboard SE', cursive;
    font-size: 22px;
    font-weight: bold;
    color: #ffdd00 !important;
    text-decoration: none !important;
    text-shadow: 2px 2px 4px #000000, 0 0 10px #ff6600;
    letter-spacing: 1px;
}

.logo-link:hover {
    color: #ffffff !important;
}

.header-marquee {
    vertical-align: middle;
    padding: 0 10px;
    color: #aaccff;
    font-size: 11px;
}

.header-user {
    width: 180px;
    vertical-align: middle;
    text-align: right;
    color: #ffffff;
    font-size: 11px;
    white-space: nowrap;
}

.header-username {
    color: #ffdd00;
    font-weight: bold;
}

.header-link {
    color: #aaccff !important;
    font-size: 11px;
    text-decoration: none;
}

.header-link:hover {
    color: #ffdd00 !important;
    text-decoration: underline;
}

/* ===== NAVBAR ===== */
.navbar {
    background: #1a1a66;
    background: linear-gradient(to bottom, #2244aa 0%, #1a1a66 100%);
    padding: 0 8px;
    border-bottom: 2px solid #003399;
}

.nav-link {
    display: inline-block;
    color: #ffffff !important;
    font-size: 12px;
    font-weight: bold;
    padding: 6px 12px;
    text-decoration: none !important;
    border-right: 1px solid #3355aa;
    transition: background 0.1s;
}

.nav-link:hover {
    background: #ff6600;
    color: #ffffff !important;
}

.nav-link:first-child {
    border-left: 1px solid #3355aa;
}

.nav-admin {
    background: #cc0000;
}

.nav-admin:hover {
    background: #ff0000;
}

.nav-time {
    color: #aaaacc;
    font-size: 11px;
    padding-right: 8px;
}

/* ===== PAGE WRAPPER & LAYOUT ===== */
.page-wrapper {
    width: 98%;
    max-width: 1024px;
    margin: 8px auto;
}

.layout-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 6px;
}

.content-cell {
    vertical-align: top;
    width: 74%;
}

.sidebar-cell {
    vertical-align: top;
    width: 26%;
}

/* ===== MAIN CONTENT BOX ===== */
.main-content {
    background: #ffffff;
    border: 2px solid #003399;
    border-top: 4px solid #003399;
    padding: 10px;
    margin-bottom: 8px;
}

.content-title {
    background: linear-gradient(to right, #003399, #0055cc);
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    padding: 5px 10px;
    margin: -10px -10px 10px -10px;
    border-bottom: 2px solid #ff6600;
    font-family: Tahoma, Verdana, sans-serif;
}

.content-title a {
    color: #ffffff !important;
}

/* ===== SIDEBAR ===== */
.sidebar-box {
    background: #ddeeff;
    border: 2px solid #336699;
    border-top: 3px solid #003399;
    padding: 8px;
    margin-bottom: 8px;
    font-size: 11px;
}

.sidebar-title {
    background: linear-gradient(to right, #003399, #336699);
    color: #ffdd00;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    margin: -8px -8px 8px -8px;
    border-bottom: 1px solid #003399;
    font-family: Tahoma, Verdana, sans-serif;
}

.sidebar-box ul {
    list-style: none;
    padding: 0;
}

.sidebar-box ul li {
    padding: 2px 0;
    border-bottom: 1px dotted #99aacc;
}

.sidebar-box ul li:before {
    content: '&#9658; ';
    color: #ff6600;
}

.sidebar-box ul li a {
    color: #003399;
    font-size: 11px;
}

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    border-bottom: 1px dotted #99aacc;
}

.sidebar-stat-num {
    font-weight: bold;
    color: #ff6600;
}

/* ===== ITEM CARDS (GRID) ===== */
.items-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.item-card {
    background: #f5f8ff;
    border: 2px solid #336699;
    width: 160px;
    padding: 6px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.1s;
}

.item-card:hover {
    border-color: #ff6600;
    background: #fff8f0;
}

.item-card-thumb {
    width: 148px;
    height: 90px;
    background: linear-gradient(135deg, #003399 0%, #0066cc 50%, #336699 100%);
    border: 1px solid #003399;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 32px;
    margin-bottom: 5px;
    overflow: hidden;
}

.item-card-thumb.software-thumb {
    background: linear-gradient(135deg, #336600 0%, #669900 50%, #99cc00 100%);
}

.item-card-title {
    font-size: 11px;
    font-weight: bold;
    color: #003399;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-card-meta {
    font-size: 10px;
    color: #666666;
    margin-bottom: 2px;
}

.item-card a {
    text-decoration: none;
}

/* ===== BADGE ===== */
.badge-new {
    position: absolute;
    top: 3px;
    right: 3px;
    background: #cc0000;
    color: #ffff00;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border: 1px solid #990000;
    font-family: Arial, sans-serif;
    animation: blinker 1s step-start infinite;
    z-index: 5;
}

@keyframes blinker {
    50% { opacity: 0.4; }
}

/* ===== SOFTWARE LIST TABLE ===== */
.software-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.software-table th {
    background: linear-gradient(to bottom, #003399 0%, #0044cc 100%);
    color: #ffffff;
    padding: 6px 8px;
    text-align: left;
    border: 1px solid #002266;
    font-weight: bold;
}

.software-table td {
    padding: 5px 8px;
    border: 1px solid #ccddee;
    vertical-align: middle;
}

.software-table tr:nth-child(even) td {
    background: #eef3ff;
}

.software-table tr:nth-child(odd) td {
    background: #ffffff;
}

.software-table tr:hover td {
    background: #fff3e6;
}

/* ===== STAR RATING ===== */
.star-rating {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 2px;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating label {
    font-size: 20px;
    color: #cccccc;
    cursor: pointer;
    transition: color 0.1s;
}

.star-rating input[type="radio"]:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffaa00;
}

.rating-display {
    display: inline-block;
    font-size: 16px;
    letter-spacing: 1px;
}

.star-filled { color: #ffaa00; }
.star-empty  { color: #cccccc; }

.rating-count {
    font-size: 11px;
    color: #666666;
    margin-left: 4px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 4px 12px;
    font-size: 12px;
    font-family: Tahoma, Verdana, sans-serif;
    font-weight: bold;
    cursor: pointer;
    border: 2px solid;
    text-decoration: none !important;
    background: #e0e0e0;
    background: linear-gradient(to bottom, #f5f5f5 0%, #d0d0d0 50%, #b8b8b8 100%);
    border-color: #ffffff #888888 #888888 #ffffff;
    color: #000000;
    box-shadow: inset 1px 1px 0 #ffffff;
    white-space: nowrap;
    user-select: none;
}

.btn:hover {
    background: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 50%, #d0d0d0 100%);
    color: #000000;
}

.btn:active {
    border-color: #888888 #ffffff #ffffff #888888;
    box-shadow: inset 1px 1px 2px #888888;
}

.btn-primary {
    background: linear-gradient(to bottom, #4488ff 0%, #0044cc 50%, #002299 100%);
    border-color: #6699ff #001166 #001166 #6699ff;
    color: #ffffff !important;
    box-shadow: inset 1px 1px 0 #6699ff;
}

.btn-primary:hover {
    background: linear-gradient(to bottom, #66aaff 0%, #2255dd 50%, #0033aa 100%);
    color: #ffffff !important;
}

.btn-danger {
    background: linear-gradient(to bottom, #ff6666 0%, #cc0000 50%, #990000 100%);
    border-color: #ff9999 #660000 #660000 #ff9999;
    color: #ffffff !important;
    box-shadow: inset 1px 1px 0 #ff9999;
}

.btn-danger:hover {
    background: linear-gradient(to bottom, #ff8888 0%, #dd2222 50%, #aa0000 100%);
    color: #ffffff !important;
}

.btn-success {
    background: linear-gradient(to bottom, #66cc44 0%, #339900 50%, #226600 100%);
    border-color: #99dd66 #115500 #115500 #99dd66;
    color: #ffffff !important;
}

.btn-sm {
    padding: 2px 7px;
    font-size: 11px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 10px;
}

.form-group label {
    display: block;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 3px;
    color: #003399;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 4px 6px;
    font-family: Tahoma, Verdana, sans-serif;
    font-size: 12px;
    border: 2px solid;
    border-color: #888888 #eeeeee #eeeeee #888888;
    background: #ffffff;
    box-shadow: inset 1px 1px 3px #cccccc;
    color: #000000;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #0033cc;
    box-shadow: inset 1px 1px 2px #aabbdd, 0 0 3px #0033cc;
}

input[type="file"] {
    background: #f0f0f0;
    padding: 2px;
}

select {
    height: 24px;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.form-hint {
    font-size: 10px;
    color: #666666;
    margin-top: 2px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 8px 12px;
    border: 2px solid;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: bold;
}

.alert-error, .error {
    background: #ffeeee;
    border-color: #cc0000;
    color: #cc0000;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 12px;
}

.alert-success, .success {
    background: #eeffee;
    border-color: #009900;
    color: #006600;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 12px;
}

.alert-info {
    background: #eeeeff;
    border-color: #0033cc;
    color: #003399;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-size: 12px;
}

/* ===== VIEW PAGE ===== */
.item-detail-box {
    background: #f0f4ff;
    border: 1px solid #336699;
    padding: 10px;
    margin-bottom: 10px;
}

.item-detail-title {
    font-size: 18px;
    font-weight: bold;
    color: #003399;
    font-family: Tahoma, Verdana, sans-serif;
    margin-bottom: 6px;
    text-shadow: 1px 1px 0 #aabbdd;
}

.meta-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin-bottom: 10px;
}

.meta-table td {
    padding: 3px 6px;
    border-bottom: 1px dotted #ccddee;
}

.meta-label {
    font-weight: bold;
    color: #336699;
    width: 120px;
}

/* Ruffle container */
#ruffle-container {
    background: #000000;
    border: 3px solid #003399;
    display: inline-block;
    margin: 8px 0;
}

/* ===== ADMIN ===== */
.admin-header {
    background: linear-gradient(to right, #660000, #990000);
    color: #ffffff;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    margin: -10px -10px 10px -10px;
    border-bottom: 2px solid #ff3300;
}

.admin-stat-box {
    display: inline-block;
    background: linear-gradient(to bottom, #336699, #003366);
    color: #ffffff;
    padding: 10px 18px;
    margin: 4px;
    border: 2px solid #002244;
    text-align: center;
    min-width: 100px;
}

.admin-stat-num {
    font-size: 28px;
    font-weight: bold;
    color: #ffdd00;
    display: block;
}

.admin-stat-label {
    font-size: 11px;
    color: #aaccff;
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #003399, #ff6600, #003399, transparent);
    margin: 10px 0;
}

/* ===== PAGINATION ===== */
.pagination {
    text-align: center;
    padding: 8px 0;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 3px 8px;
    margin: 0 2px;
    border: 1px solid #336699;
    font-size: 11px;
    font-weight: bold;
}

.pagination a {
    background: #ddeeff;
    color: #003399;
}

.pagination a:hover {
    background: #ff6600;
    color: #ffffff;
    border-color: #cc4400;
    text-decoration: none;
}

.pagination .current-page {
    background: #003399;
    color: #ffffff;
    border-color: #002266;
}

/* ===== CATEGORY FILTER BAR ===== */
.cat-filter {
    background: #eef2ff;
    border: 1px solid #99aacc;
    padding: 6px 8px;
    margin-bottom: 8px;
    font-size: 11px;
}

.cat-filter a {
    display: inline-block;
    padding: 2px 8px;
    margin: 2px;
    background: #ddeeff;
    border: 1px solid #336699;
    color: #003399;
    font-size: 11px;
}

.cat-filter a:hover,
.cat-filter a.active {
    background: #ff6600;
    color: #ffffff;
    border-color: #cc4400;
    text-decoration: none;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(to bottom, #001155 0%, #000033 100%);
    color: #aaaacc;
    padding: 8px 12px;
    border-top: 3px solid #ff6600;
    font-size: 11px;
    margin-top: 10px;
}

.footer-link {
    color: #6688cc !important;
    font-size: 11px;
}

.footer-link:hover {
    color: #ffdd00 !important;
}

.footer-powered {
    color: #6688cc;
}

/* ===== MISC UTILITY ===== */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-bold   { font-weight: bold; }
.text-small  { font-size: 10px; }
.text-orange { color: #ff6600; }
.text-blue   { color: #003399; }
.text-red    { color: #cc0000; }
.text-green  { color: #009900; }
.mt-6  { margin-top: 6px; }
.mb-6  { margin-bottom: 6px; }
.p-6   { padding: 6px; }

hr.retro {
    border: none;
    border-top: 1px solid #99aacc;
    border-bottom: 1px solid #ffffff;
    margin: 8px 0;
}

/* ===== DOWNLOAD BUTTON ===== */
.download-btn {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(to bottom, #66cc44 0%, #339900 60%, #226600 100%);
    border: 2px solid;
    border-color: #99ff66 #115500 #115500 #99ff66;
    color: #ffffff !important;
    font-size: 14px;
    font-weight: bold;
    font-family: Tahoma, Verdana, sans-serif;
    text-decoration: none !important;
    box-shadow: 2px 2px 4px #555555;
    cursor: pointer;
}

.download-btn:hover {
    background: linear-gradient(to bottom, #88ee66 0%, #44aa11 60%, #337700 100%);
}

/* ===== ONLINE INDICATOR ===== */
.online-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00cc00;
    border-radius: 50%;
    border: 1px solid #006600;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.5; }
    100% { opacity: 1; }
}

/* ===== UPLOAD PROGRESS ===== */
.upload-area {
    background: #f8f8ff;
    border: 2px dashed #336699;
    padding: 15px;
    text-align: center;
    color: #336699;
    margin-bottom: 8px;
}

/* ===== LOGIN/REGISTER FORM WRAPPER ===== */
.form-page-wrapper {
    max-width: 420px;
    margin: 20px auto;
}

/* ===== TABLE STRIPING UTILITY ===== */
.table-striped {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.table-striped th {
    background: linear-gradient(to bottom, #003399 0%, #0044cc 100%);
    color: #ffffff;
    padding: 5px 8px;
    border: 1px solid #002266;
    font-weight: bold;
    text-align: left;
}

.table-striped td {
    padding: 4px 8px;
    border: 1px solid #ccd5e8;
}

.table-striped tr:nth-child(even) td {
    background: #eef3ff;
}

.table-striped tr:nth-child(odd) td {
    background: #ffffff;
}

.table-striped tr:hover td {
    background: #fff3e6;
}
