/* Theme Variables */
:root {
    --bg-primary: #000033;
    --bg-secondary: rgba(0,0,0,0.7);
    --text-primary: #00FF00;
    --text-secondary: #A0A4B0;
    --accent-primary: #00FFFF;
    --accent-secondary: #FF00FF;
    --border-color: #00FFFF;
    --shadow-color: rgba(0,255,255,0.3);
    --font-family: "Courier New", Courier, monospace;
}

/* IBM Theme */
.theme-ibm {
    --bg-primary: #000000;
    --bg-secondary: rgba(0,0,0,0.8);
    --text-primary: #00FF00;
    --text-secondary: #C0C0C0;
    --accent-primary: #00FF00;
    --accent-secondary: #00FF00;
    --border-color: #00FF00;
    --shadow-color: rgba(0,255,0,0.3);
}

/* Black on White Theme */
.theme-bow {
    --bg-primary: #FFFFFF;
    --bg-secondary: rgba(255,255,255,0.9);
    --text-primary: #000000;
    --text-secondary: #333333;
    --accent-primary: #000000;
    --accent-secondary: #666666;
    --border-color: #000000;
    --shadow-color: rgba(0,0,0,0.3);
}

/* White on Black Theme */
.theme-wob {
    --bg-primary: #000000;
    --bg-secondary: rgba(0,0,0,0.8);
    --text-primary: #FFFFFF;
    --text-secondary: #CCCCCC;
    --accent-primary: #FFFFFF;
    --accent-secondary: #FFFFFF;
    --border-color: #FFFFFF;
    --shadow-color: rgba(255,255,255,0.3);
}

/* VTY Terminal Theme */
.theme-vty {
    --bg-primary: #1a1a00;
    --bg-secondary: rgba(26,26,0,0.8);
    --text-primary: #FF8800;
    --text-secondary: #FFAA44;
    --accent-primary: #FF8800;
    --accent-secondary: #FF6600;
    --border-color: #FF8800;
    --shadow-color: rgba(255,136,0,0.4);
}

/* Base Body Styles */
body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 20% 80%, #330066 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #003366 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, #000066 0%, transparent 50%);
    color: var(--text-primary);
    font-family: var(--font-family);
    min-height: 100vh;
    transition: all 0.3s ease;
}

.theme-ibm body {
    background-image: none;
}

.theme-bow body {
    background-image: none;
}

.theme-wob body {
    background-image: none;
}

.theme-vty body {
    background-image: 
        radial-gradient(circle at 20% 80%, #332200 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, #221100 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, #1a1a00 0%, transparent 50%);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 0;
    background: linear-gradient(to right, transparent, rgba(120,120,140,0.15), transparent);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
    position: relative;
}

h1 {
    font-size: 48px;
    margin: 0;
    color: var(--accent-primary);
    font-family: "Lucida Console", "Monaco", "Courier New", monospace;
    font-weight: normal;
    letter-spacing: 8px;
    text-shadow: 
        0 0 10px var(--accent-primary),
        0 0 20px var(--accent-primary),
        0 0 30px var(--accent-primary),
        1px 1px 2px rgba(0,0,0,0.5);
    animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% { text-shadow: 0 0 10px var(--accent-primary), 0 0 20px var(--accent-primary), 0 0 30px var(--accent-primary), 1px 1px 2px rgba(0,0,0,0.5); }
    100% { text-shadow: 0 0 20px var(--accent-secondary), 0 0 30px var(--accent-secondary), 0 0 40px var(--accent-secondary), 1px 1px 2px rgba(0,0,0,0.5); }
}

.subtitle {
    color: var(--text-secondary);
    font-size: 16px;
    letter-spacing: 2px;
    margin-top: 10px;
    font-family: "Monaco", "Lucida Console", monospace;
}

/* Burger Menu */
.burger-menu {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    cursor: pointer;
    padding: 10px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    transition: all 0.3s ease;
    display: none; /* Hidden by default, shown when logged in */
}

.burger-menu:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--shadow-color);
}

.burger-icon {
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    margin: 5px 0;
    transition: 0.3s;
    position: relative;
}

.burger-icon::before,
.burger-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--accent-primary);
    transition: 0.3s;
}

.burger-icon::before {
    top: -8px;
}

.burger-icon::after {
    top: 8px;
}

.burger-menu.active .burger-icon {
    background: transparent;
}

.burger-menu.active .burger-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.burger-menu.active .burger-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Settings Panel */
.settings-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 400px;
    height: 100vh;
    background: var(--bg-secondary);
    border-left: 2px solid var(--border-color);
    padding: 20px;
    transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 999;
    overflow-y: auto;
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
}

.settings-panel.active {
    right: 0;
}

/* Hide main content when settings panel is open */
body.settings-open .container {
    transform: translateX(-60px);
    opacity: 0.2;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: blur(2px);
}

body.settings-open .burger-menu {
    transform: translateX(-60px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced overlay for better focus */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 998;
    display: none;
    backdrop-filter: blur(5px);
}

.settings-overlay.active {
    display: block;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0px);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(5px);
    }
}

.settings-header {
    color: var(--accent-primary);
    font-size: 24px;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    color: var(--accent-primary);
    font-size: 16px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.theme-btn {
    padding: 10px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.theme-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 10px var(--shadow-color);
}

.theme-btn.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--shadow-color);
}

.form-group {
    margin: 15px 0;
}

label {
    color: var(--accent-primary);
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 10px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: var(--font-family);
    font-size: 14px;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 15px var(--shadow-color);
}

.btn {
    padding: 10px 20px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 5px;
    color: var(--accent-primary);
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 15px var(--shadow-color);
    transform: translateY(-1px);
}

.btn-delete {
    border-color: #FF6666;
    color: #FF6666;
}

.btn-delete:hover {
    background: #FF6666;
    color: var(--bg-primary);
    box-shadow: 0 0 15px rgba(255,102,102,0.5);
}

/* Navigation */
.nav {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.nav a {
    color: var(--accent-primary);
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 10px;
    border: 2px solid var(--border-color);
    display: inline-block;
    background: var(--bg-primary);
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
}

.nav a:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    box-shadow: 0 0 20px var(--shadow-color);
    transform: scale(1.1);
}

/* Content Box */
.content-box {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 30px;
    margin: 20px 0;
    box-shadow: 
        0 0 20px var(--shadow-color),
        inset 0 0 20px rgba(0,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.content-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 10px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
}

@keyframes borderGlow {
    0% { opacity: 0.3; }
    50% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

/* Login Box */
.login-box {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 
        0 0 20px var(--shadow-color),
        inset 0 0 20px rgba(0,255,255,0.1);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
    border-radius: 10px;
    z-index: -1;
    animation: borderGlow 4s linear infinite;
}

/* Status Messages */
.status-msg {
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
    text-align: center;
    font-size: 12px;
    display: none;
}

.status-success {
    background: rgba(0,255,0,0.1);
    border: 1px solid #00FF00;
    color: #00FF00;
}

.status-error {
    background: rgba(255,0,0,0.1);
    border: 1px solid #FF6666;
    color: #FF6666;
}

/* Blink Animation */
.blink {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* VTY Terminal Effects */
.theme-vty .content-box::before,
.theme-vty .login-box::before {
    background: linear-gradient(45deg, #FF8800, #FF6600, #FF8800);
    animation: vtyGlow 2s linear infinite;
}

@keyframes vtyGlow {
    0% { opacity: 0.4; }
    50% { opacity: 0.8; }
    100% { opacity: 0.4; }
}

.theme-vty h1 {
    text-shadow: 
        0 0 10px #FF8800,
        0 0 20px #FF8800,
        0 0 30px #FF8800,
        0 0 40px #FF6600,
        1px 1px 2px rgba(0,0,0,0.8);
}

/* Matrix background animation */
canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.05;
}

.theme-vty canvas {
    opacity: 0.1;
}

/* Gallery specific styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.gallery-item {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-color);
}

.gallery-item img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.gallery-item h3 {
    color: var(--accent-primary);
    margin: 0 0 10px 0;
    font-size: 18px;
}

.gallery-item p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* Admin specific styles */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.form-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
}

.form-section h3 {
    color: var(--accent-primary);
    margin: 0 0 20px 0;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.items-list {
    max-height: 600px;
    overflow-y: auto;
}

.gallery-item-admin {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    padding: 15px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    border-radius: 3px;
}

.item-info {
    flex: 1;
}

.item-title {
    color: var(--accent-primary);
    font-size: 14px;
    margin: 0 0 5px 0;
    font-weight: bold;
}

.item-description {
    color: var(--text-secondary);
    font-size: 11px;
    margin: 0;
    line-height: 1.3;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.preview-image {
    max-width: 100%;
    max-height: 150px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin: 10px 0;
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .settings-panel {
        width: 100%;
        right: -100%;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}
