/* Spaghetti Labs - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', monospace;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #00ff41;
    overflow-x: hidden;
    min-height: 100vh;
}

/* Authentication Header */
.auth-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid #00ff41;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.75rem 0;
}

.auth-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-status {
    font-size: 0.9rem;
    color: #00ff41;
}

.auth-loading {
    opacity: 0.7;
    animation: pulse 1.5s infinite;
}

.auth-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-username {
    color: #00ff41;
    font-weight: bold;
}

.auth-role {
    background: rgba(0, 255, 65, 0.2);
    color: #00ff41;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-size: 0.8rem;
    border: 1px solid #00ff41;
}

.auth-role.admin {
    background: rgba(255, 68, 68, 0.2);
    color: #ff4444;
    border-color: #ff4444;
}

.auth-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.auth-link {
    color: #00ff41;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #00ff41;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: rgba(0, 255, 65, 0.1);
}

.auth-link:hover {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    transform: translateY(-1px);
}

.auth-link.admin {
    color: #ff4444;
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
}

.auth-link.admin:hover {
    background: rgba(255, 68, 68, 0.2);
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.3);
}

.auth-link.logout {
    background: rgba(255, 68, 68, 0.1);
    border-color: #ff6666;
    color: #ff6666;
}

.auth-link.logout:hover {
    background: rgba(255, 68, 68, 0.2);
}

/* Matrix Background */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6.5rem 2rem 2rem 2rem;
    position: relative;
    z-index: 1;
}

@media (max-width: 1024px) {
    .container {
        padding: 6.5rem 1.5rem 2rem 1.5rem;
    }
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 3rem;
    animation: glow 2s ease-in-out infinite alternate;
}

.logo {
    font-size: 3.5rem;
    font-weight: bold;
    text-shadow: 0 0 20px #00ff41, 0 0 40px #00ff41, 0 0 60px #00ff41;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: #00cc33;
    text-shadow: 0 0 10px #00cc33;
    opacity: 0;
    animation: fadeIn 2s 1s forwards;
}

/* Status Board Styles */
.status-board {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #00ff41;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.3);
    position: relative;
    overflow: hidden;
}

.status-board::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #00ff41, #00cc33, #009922, #00cc33, #00ff41);
    z-index: -1;
    border-radius: 10px;
    animation: borderGlow 3s linear infinite;
}

.status-header {
    color: #00ff41;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
    text-shadow: 0 0 15px #00ff41;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.status-item {
    background: rgba(0, 20, 0, 0.8);
    border: 1px solid #00cc33;
    border-radius: 5px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.status-item:hover {
    border-color: #00ff41;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    transform: translateY(-5px);
}

.status-label {
    color: #00cc33;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.status-value {
    color: #00ff41;
    font-size: 1.3rem;
    font-weight: bold;
    text-shadow: 0 0 10px #00ff41;
}

.online-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #00ff41;
    border-radius: 50%;
    margin-right: 8px;
    animation: blink 1s infinite;
    box-shadow: 0 0 10px #00ff41;
}

/* Services Section */
.services {
    margin-top: 3rem;
}

.services-header {
    color: #00ff41;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 0 15px #00ff41;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: rgba(0, 20, 0, 0.9);
    border: 1px solid #00cc33;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.service-status {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.service-status.active {
    background: #00ff41;
    box-shadow: 0 0 12px rgba(0, 255, 65, 0.6);
    animation: pulse-green 2s infinite;
}

.service-status.inactive {
    background: #666;
    box-shadow: 0 0 8px rgba(102, 102, 102, 0.4);
}

.service-status.maintenance {
    background: #ffaa00;
    box-shadow: 0 0 12px rgba(255, 170, 0, 0.6);
    animation: pulse-orange 2s infinite;
}

.service-status.error {
    background: #ff4444;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.6);
    animation: pulse-red 2s infinite;
}

.service-card:hover {
    border-color: #00ff41;
    box-shadow: 0 0 25px rgba(0, 255, 65, 0.4);
    transform: scale(1.05);
    text-decoration: none;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #00ff41;
}

.service-name {
    color: #00ff41;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.service-desc {
    color: #00cc33;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    color: #009922;
    border-top: 1px solid #00cc33;
}

/* Terminal Styles */
.terminal-line {
    color: #00cc33;
    margin: 0.5rem 0;
    font-family: 'Courier New', monospace;
}

.cursor {
    animation: blink 1s infinite;
}

/* Animations */
@keyframes glow {
    from { text-shadow: 0 0 20px #00ff41, 0 0 40px #00ff41, 0 0 60px #00ff41; }
    to { text-shadow: 0 0 30px #00ff41, 0 0 60px #00ff41, 0 0 90px #00ff41; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes borderGlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 12px rgba(0, 255, 65, 0.6); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 65, 1); }
}

@keyframes pulse-orange {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 170, 0, 0.6); }
    50% { box-shadow: 0 0 20px rgba(255, 170, 0, 1); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 68, 68, 0.6); }
    50% { box-shadow: 0 0 20px rgba(255, 68, 68, 1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo { font-size: 2.5rem; }
    .container { padding: 1rem; padding-top: 6rem; }
    .status-grid { grid-template-columns: 1fr; }
    
    /* Auth header responsive */
    .auth-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .auth-actions {
        gap: 0.5rem;
    }
    
    .auth-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

/* Server Status Page Styles */
.server-card {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.server-name {
    font-size: 1.5em;
    color: #00ff00;
    font-weight: bold;
}

.server-status {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-online {
    background: rgba(0, 255, 0, 0.2);
    color: #00ff00;
    border: 1px solid #00ff00;
}

.status-offline {
    background: rgba(255, 0, 0, 0.2);
    color: #ff0000;
    border: 1px solid #ff0000;
}

.server-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 0, 0.3);
}

.info-label {
    color: #00ff88;
}

.info-value {
    color: #ffffff;
    font-weight: bold;
    text-align: right;
}

.connection-info {
    background: rgba(0, 255, 0, 0.05);
    border: 1px dashed #00ff00;
    border-radius: 5px;
    padding: 15px;
    margin-top: 15px;
}

.connection-title {
    color: #00ff00;
    font-weight: bold;
    margin-bottom: 10px;
}

.back-link {
    color: #00ff00;
    text-decoration: none;
    margin-bottom: 20px;
    display: inline-block;
}

.back-link:hover {
    text-shadow: 0 0 5px #00ff00;
}

.refresh-btn {
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    color: #00ff00;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}

.refresh-btn:hover {
    background: rgba(0, 255, 0, 0.2);
}

.last-updated {
    font-size: 0.8em;
    color: #888;
    margin-top: 10px;
}

/* Admin Controls */
.admin-controls {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 5px;
}

.admin-controls button {
    transition: all 0.2s ease;
}

.admin-controls button:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

.admin-commands code {
    color: #00ff41;
    display: block;
    margin: 2px 0;
}

.admin-commands strong {
    color: #ffc107;
}
