/* DerryCTF Main Layout Styles */

:root {
    --ctf-primary: #3b82f6;
    --ctf-primary-dark: #2563eb;
    --ctf-primary-light: #60a5fa;
    --ctf-accent: #06b6d4;
    --ctf-dark: #1e293b;
    --ctf-darker: #0f172a;
    --ctf-border: #e2e8f0;
    --ctf-gray: #64748b;
    --ctf-light: #f8fafc;
}

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

body {
    font-family: 'Space Mono', monospace;
    background-color: #ffffff;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

code, pre, .code, .monospace {
    font-family: 'Space Mono', monospace;
}

/* Navbar - Black */
.navbar {
    background-color: #000 !important;
    padding: 0.75rem 0;
    border-bottom: 1px solid #333;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    color: #fff !important;
}

.navbar-brand .text-accent {
    color: var(--ctf-primary) !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    display: block !important;
    order: 2;
    margin-left: auto;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.offcanvas {
    background-color: #000;
    max-width: 280px;
}

.offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.offcanvas-title {
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}

.btn-close {
    filter: invert(1);
}

.offcanvas .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.85rem 1rem !important;
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    position: relative;
}

.offcanvas .nav-link i {
    width: 20px;
    text-align: center;
    color: rgba(255,255,255,0.8);
    margin-right: 0.5rem;
}

.offcanvas .nav-link:hover,
.offcanvas .nav-link.active {
    color: #fff !important;
    background-color: rgba(13, 110, 253, 0.15);
}

/* Buttons */
.btn-primary {
    background-color: var(--ctf-primary);
    border-color: var(--ctf-primary);
    color: #fff;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--ctf-primary-dark);
    border-color: var(--ctf-primary-dark);
    color: #fff;
}

.btn-outline-primary {
    border-color: var(--ctf-primary);
    color: var(--ctf-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ctf-primary);
    border-color: var(--ctf-primary);
    color: #fff;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Content sections */
.content-section {
    padding: 2rem 0;
    background-color: #fff;
    flex: 1;
}

.section-card {
    background-color: #fff;
    border: 1px solid var(--ctf-border);
    border-radius: 0.5rem;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.section-title {
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--ctf-dark);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--ctf-primary);
    display: inline-block;
}

/* Form styles */
.form-control:focus {
    border-color: var(--ctf-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: var(--ctf-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Alert styles */
.alert-success {
    background-color: rgba(13, 110, 253, 0.1);
    border-color: var(--ctf-primary);
    color: var(--ctf-primary-dark);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: #dc3545;
    color: #721c24;
}

/* Footer - Black */
footer {
    background-color: #000;
    padding: 1.25rem 0;
    margin-top: auto;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.footer-copyright {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--ctf-primary);
    text-decoration: underline;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-social a {
    color: rgba(255,255,255,0.6);
    font-size: 1.1rem;
    transition: color 0.2s ease;
}

.footer-social a:hover {
    color: var(--ctf-primary);
}

/* Tab styles */
.nav-tabs .nav-link {
    color: var(--ctf-gray);
    border: none;
    border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link.active {
    color: var(--ctf-primary);
    background-color: transparent;
    border-bottom-color: var(--ctf-primary);
}

.nav-tabs .nav-link:hover {
    color: var(--ctf-primary-dark);
    border-bottom-color: var(--ctf-primary-light);
}

/* Challenge specific styles */
.challenge-description {
    font-size: 1.1rem;
    line-height: 1.6;
}

.nav-pills .nav-link {
    color: var(--ctf-gray);
    border-radius: 20px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.nav-pills .nav-link.active {
    background-color: var(--ctf-primary);
    color: white;
}

.nav-pills .nav-link:hover {
    background-color: var(--ctf-primary-light);
    color: white;
}

/* Time conversion styles */
.utc-time, .relative-time {
    cursor: help;
    border-bottom: 1px dotted #ccc;
}

.time-converted {
    color: inherit;
}

.time-converted:hover {
    border-bottom-color: var(--ctf-primary);
}

/* Table styles */
.table th {
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    font-weight: 600;
}

.table td {
    border-color: var(--ctf-border);
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
}

/* Badge styles */
.badge.bg-primary {
    background-color: var(--ctf-primary) !important;
}

.badge.bg-success {
    background-color: #28a745 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}