:root {
    --aperture-orange: #F58025;
    --aperture-blue: #00AEEF;
    --aperture-dark: #191919;
    --aperture-light: #F8F9FA;
    --aperture-gray: #7B7B7B;
    --bg-color: #E0E0E0;
    --card-bg: #FFFFFF;
    --text-color: #333333;
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Scanlines Effect */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 0) 50%,
            rgba(0, 0, 0, 0.02) 50%,
            rgba(0, 0, 0, 0.02));
    background-size: 100% 4px;
    pointer-events: none;
    z-index: 100;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0) 60%, rgba(0, 0, 0, 0.1) 100%);
    pointer-events: none;
    z-index: 99;
}

/* Header */
header {
    background-color: var(--card-bg);
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid var(--aperture-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    height: 80px;
    width: auto;
}

.header-text h1 {
    font-size: 1.8rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--aperture-dark);
    margin-bottom: 0.2rem;
}

.header-text h2 {
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 4px;
    color: var(--aperture-gray);
    text-transform: uppercase;
}

.status-panel {
    text-align: right;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    border-left: 2px solid var(--aperture-orange);
    padding-left: 1rem;
}

.status-item {
    margin-bottom: 0.3rem;
}

.blink {
    animation: blinker 1.5s linear infinite;
    color: var(--aperture-orange);
    font-weight: bold;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

.warning-banner {
    background-color: var(--aperture-dark);
    color: var(--aperture-orange);
    padding: 0.8rem;
    text-align: center;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    border: 1px solid var(--aperture-orange);
    text-transform: uppercase;
    font-size: 0.9rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Service Card */
.card {
    background-color: var(--card-bg);
    border: 1px solid #ccc;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--aperture-blue);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--aperture-gray);
    transition: background-color 0.3s ease;
}

.card:hover::before {
    background-color: var(--aperture-blue);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--aperture-dark);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--aperture-gray);
}

.test-chamber-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: #ddd;
}

.card:hover .test-chamber-number {
    color: var(--aperture-blue);
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--aperture-dark);
    color: #888;
    font-size: 0.8rem;
    border-top: 4px solid var(--aperture-orange);
}

footer p {
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1rem;
    }

    .logo-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .status-panel {
        border-left: none;
        border-top: 2px solid var(--aperture-orange);
        padding-top: 1rem;
        padding-left: 0;
        text-align: center;
        width: 100%;
    }

    main {
        padding: 1rem;
    }
}

/* Minecraft Checker Section */
.checker-section {
    margin-top: 4rem;
    border-top: 2px solid var(--aperture-gray);
    padding-top: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.section-header h3 {
    color: var(--aperture-orange);
    font-weight: 900;
    letter-spacing: 2px;
    white-space: nowrap;
}

.section-line {
    height: 2px;
    background-color: var(--aperture-orange);
    width: 100%;
    opacity: 0.5;
}

.checker-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
}

/* Premium Retro Terminal Styles */
.terminal-window {
    background-color: #0a0a0a;
    border: 2px solid #555;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 10px var(--aperture-orange);
    font-family: 'VT323', monospace;
    width: 100%;
    max-width: 450px;
    flex: 0 0 450px;
}

.terminal-title-bar {
    background-color: #333;
    color: #fff;
    padding: 0.2rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #555;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.terminal-title {
    font-weight: normal;
}

.window-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    cursor: pointer;
    font-weight: bold;
    padding: 0 0.3rem;
}

.control-btn:hover {
    color: var(--aperture-orange);
}

.terminal-body {
    padding: 1rem;
    color: var(--aperture-orange);
    text-shadow: 0 0 5px rgba(245, 128, 37, 0.5);
    font-size: 1.4rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.terminal-output p {
    margin: 0;
    opacity: 0.8;
    line-height: 1.2;
}

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.terminal-prompt {
    color: var(--aperture-orange);
    font-weight: bold;
    white-space: nowrap;
}

.terminal-input {
    background: transparent;
    border: none;
    color: var(--aperture-light);
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    flex: 1;
    outline: none;
    caret-color: var(--aperture-orange);
    text-transform: uppercase;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* Results Area */
.results-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    align-content: start;
    flex: 1;
}

.result-item {
    background-color: white;
    padding: 1rem;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: #ccc;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.2s;
}

.delete-btn:hover {
    color: #e74c3c;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-item span:first-child {
    font-weight: bold;
    font-size: 1.1rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.2rem;
    width: 100%;
    text-align: center;
    margin-top: 0.5rem;
}

.status-available {
    color: #2ecc71;
    font-weight: 900;
    font-size: 0.9rem;
    background-color: rgba(46, 204, 113, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-taken {
    color: #e74c3c;
    font-weight: 900;
    font-size: 0.9rem;
    background-color: rgba(231, 76, 60, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.status-loading {
    color: var(--aperture-blue);
    font-style: italic;
}

.status-error {
    color: #f39c12;
}

@media (max-width: 768px) {
    .checker-container {
        display: flex;
        flex-direction: column;
    }
}

/* Maintenance Mode Controls */
.maintenance-btn {
    background: transparent;
    border: 1px solid var(--aperture-gray);
    color: var(--aperture-gray);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.maintenance-btn:hover,
.maintenance-active .maintenance-btn {
    border-color: #e74c3c;
    color: #e74c3c;
    box-shadow: 0 0 5px rgba(231, 76, 60, 0.3);
}

/* Edit Mode Styles */
.edit-overlay {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.maintenance-active .edit-overlay {
    opacity: 1;
    pointer-events: auto;
}

.card-action-btn {
    background: var(--card-bg);
    border: 1px solid var(--aperture-gray);
    color: var(--text-color);
    width: 24px;
    height: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border-radius: 2px;
}

.card-action-btn:hover {
    background: var(--aperture-blue);
    color: white;
    border-color: var(--aperture-blue);
}

.add-service-card {
    border: 2px dashed var(--aperture-gray);
    background: rgba(0, 0, 0, 0.02);
    justify-content: center;
    opacity: 0.6;
    cursor: pointer;
    min-height: 200px;
}

.add-service-card:hover {
    opacity: 1;
    border-color: var(--aperture-blue);
    color: var(--aperture-blue);
}

.add-icon {
    font-size: 4rem;
    font-weight: bold;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-bg);
    border: 2px solid var(--aperture-dark);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal-header {
    background-color: var(--aperture-dark);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1rem;
    letter-spacing: 2px;
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
}

.close-modal:hover {
    color: var(--aperture-orange);
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: bold;
    font-size: 0.8rem;
    color: var(--aperture-gray);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-group input:focus {
    border-color: var(--aperture-orange);
    outline: none;
    box-shadow: 0 0 5px rgba(245, 128, 37, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.save-btn {
    background-color: var(--aperture-orange);
    color: white;
}

.save-btn:hover {
    background-color: #d35400;
}

.delete-btn-modal {
    background-color: #e74c3c;
    color: white;
}

.delete-btn-modal:hover {
    background-color: #c0392b;
}

/* Icon Picker */
.icon-picker-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 0.5rem;
    max-height: 250px;
    overflow-y: auto;
    padding: 0.5rem;
    border: 1px solid #ccc;
    background: rgba(0, 0, 0, 0.05);
}

.icon-option {
    font-size: 1.5rem;
    padding: 0.2rem;
    border: 1px solid transparent;
    cursor: pointer;
    background: var(--card-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.icon-option:hover {
    transform: scale(1.1);
    border-color: var(--aperture-gray);
}

.icon-option.selected {
    border-color: var(--aperture-orange);
    background-color: rgba(245, 128, 37, 0.1);
    box-shadow: 0 0 5px rgba(245, 128, 37, 0.3);
}

/* Custom Icon Image */
.service-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}