/**
 * QRZ-1 MARS Mod Unified Design Language
 * Brand Colors (Marketing Team Guidelines):
 * - Orange (Primary): #B76231
 * - Navy (Primary): #062248
 * - Cream (Accent): #F2E6B3
 */

/* === CSS CUSTOM PROPERTIES === */
:root {
    /* Brand Colors */
    --color-navy: #062248;
    --color-orange: #B76231;
    --color-orange-dark: #a05225;
    --color-cream: #F2E6B3;
    
    /* Legacy alias for compatibility */
    --color-copper: #B76231;
    --color-copper-dark: #a05225;
    
    /* Assets */
    --header-bg-image: url('images/new_explorer_header.png');
}

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f0f2f5;
    min-height: 100vh;
    padding: 20px;
}

/* === CONTAINER & LAYOUT === */
.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.content {
    padding: 40px 30px;
}

/* === HEADER === */
.header {
    background: linear-gradient(90deg, var(--color-navy) 0%, var(--color-navy) 45%, rgba(6, 34, 72, 0.8) 60%, rgba(6, 34, 72, 0) 100%), var(--header-bg-image);
    background-size: cover;
    background-position: center right;
    color: white;
    padding: 60px 50px;
    text-align: left;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 220px;
}

.header-content {
    max-width: 60%;
    position: relative;
    z-index: 2;
}

.header h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header p {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
    max-width: 90%;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Header variant for admin pages without background image */
.header-simple {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-navy);
}

.header-simple h1 {
    color: var(--color-navy);
    font-size: 2rem;
    margin-bottom: 5px;
    text-shadow: none;
}

.header-simple p {
    color: #666;
    font-size: 0.95rem;
    text-shadow: none;
}

/* === USER INFO === */
.user-info {
    text-align: right;
}

.user-email {
    color: var(--color-navy);
    font-weight: 600;
    font-size: 0.95rem;
}

.logout-link {
    color: var(--color-orange);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
    margin-left: 1rem;
}

.logout-link:hover {
    color: var(--color-orange-dark);
    text-decoration: underline;
}

/* === INFO BOXES === */
.info-box {
    background: var(--color-cream);
    border-left: 5px solid var(--color-navy);
    padding: 25px;
    margin-bottom: 30px;
    border-radius: 8px;
    color: var(--color-navy);
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.info-box h3 {
    color: var(--color-navy);
    margin-bottom: 15px;
    font-size: 1.3rem;
    border-bottom: 1px solid rgba(6, 34, 72, 0.1);
    padding-bottom: 10px;
}

.info-box ol, .info-box ul {
    margin-left: 20px;
    margin-top: 10px;
}

.info-box li {
    margin-bottom: 8px;
}

.info-box strong {
    color: var(--color-orange);
}

.info-box p {
    margin: 5px 0;
    color: #555;
}

/* Alternative info box style */
.info-box-blue {
    background: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.info-box-blue strong {
    color: var(--color-navy);
}

/* === WARNING BOXES === */
.warning-box {
    background: #fff5f0;
    border: 1px solid rgba(183, 98, 49, 0.2);
    border-left: 5px solid var(--color-orange);
    padding: 20px;
    margin: 20px 0;
    border-radius: 8px;
    color: var(--color-navy);
}

.warning-box h3 {
    color: var(--color-orange);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* Alternative warning style */
.warning-box-yellow {
    background: var(--color-cream);
    border-left: 4px solid var(--color-orange);
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    color: var(--color-navy);
}

/* === CARDS === */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.card h2 {
    color: var(--color-navy);
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

/* === FORM SECTIONS === */
.form-section {
    background: #fff;
    padding: 30px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 30px;
}

.form-section h2 {
    color: var(--color-navy);
    margin-bottom: 25px;
    font-size: 1.8rem;
    text-align: center;
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--color-navy);
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="password"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: 0 0 0 3px rgba(183, 98, 49, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.875rem;
}

/* === BUTTONS === */
.btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    background: var(--color-orange);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover,
.btn-primary:hover {
    background-color: var(--color-orange-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(183, 98, 49, 0.3);
}

.btn-submit:active,
.btn-primary:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--color-orange);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

/* === MESSAGES & ALERTS === */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.error {
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: 600;
}

.result-success {
    background: #d4edda;
    border: 2px solid #c3e6cb;
    border-left: 4px solid #28a745;
    padding: 25px;
    margin: 30px 0;
    border-radius: 8px;
}

.result-success h3 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* === UNLOCK CODE DISPLAY === */
.unlock-code {
    font-size: 2.5rem;
    font-weight: 700;
    color: #28a745;
    font-family: 'Courier New', monospace;
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 6px;
    margin: 15px 0;
    letter-spacing: 3px;
}

/* === KEY MAPPING === */
.key-mapping {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
}

.key-mapping ul {
    list-style: none;
    margin: 0;
}

.key-mapping li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.key-mapping li:last-child {
    border-bottom: none;
}

.key-mapping strong {
    color: var(--color-orange);
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

/* === FAQ SECTION === */
.faq-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid #e9ecef;
}

.faq-section h2 {
    color: #333;
    margin-bottom: 30px;
    font-size: 2rem;
    text-align: center;
}

.faq-item {
    margin-bottom: 25px;
    padding: 20px;
    background: var(--color-cream);
    border-radius: 8px;
    border-left: 4px solid var(--color-navy);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-item h4 {
    color: var(--color-navy);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.faq-item p {
    color: #555;
    line-height: 1.7;
}

/* === FOOTER === */
.footer {
    background: var(--color-navy);
    padding: 30px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    margin-top: 40px;
}

/* === STATUS BADGES === */
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.enabled {
    background: #d4edda;
    color: #155724;
}

.status-badge.disabled {
    background: #f8d7da;
    color: #721c24;
}

/* === TOGGLE SWITCH === */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--color-cream);
    border-radius: 8px;
    margin-bottom: 20px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    flex: 1;
}

.toggle-label strong {
    display: block;
    color: var(--color-navy);
    font-size: 1.1rem;
    margin-bottom: 3px;
}

.toggle-label span {
    color: #666;
    font-size: 0.9rem;
}

/* === NAVIGATION === */
.navigation {
    margin-top: 20px;
}

.navigation a {
    color: var(--color-navy);
    text-decoration: none;
    padding: 10px 20px;
    display: inline-block;
    background: var(--color-cream);
    border-radius: 6px;
    margin-right: 10px;
    transition: all 0.2s;
}

.navigation a:hover {
    background: #e9ecef;
}

/* === SETTINGS META === */
.settings-meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #6c757d;
    font-size: 0.85rem;
}

/* === OUTPUT DISPLAY === */
.output {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.tokens {
    margin-top: 2rem;
    font-weight: bold;
    font-size: 1.2rem;
}

/* === UTILITY CLASSES === */
.uppercase-monospace {
    text-transform: uppercase;
    font-family: 'Courier New', monospace;
}

.text-center {
    text-align: center;
}

.success-text {
    text-align: center;
    color: #155724;
    margin-top: 10px;
}

.example-text {
    margin-top: 15px;
}

.info-box-white {
    background: white;
    margin-top: 20px;
}

.token-list-item {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--color-orange);
    padding: 5px 0;
}

.captcha-container {
    display: flex;
    justify-content: center;
    margin: 25px 0;
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header {
        background: linear-gradient(180deg, var(--color-navy) 0%, var(--color-navy) 60%, rgba(6, 34, 72, 0) 100%), var(--header-bg-image);
        background-position: center bottom;
        background-size: cover;
        text-align: center;
        padding: 40px 20px 180px 20px;
    }

    .header-content {
        max-width: 100%;
    }

    .header h1 {
        font-size: 2rem;
    }

    .header-simple {
        flex-direction: column;
        text-align: center;
    }

    .user-info {
        text-align: center;
        margin-top: 15px;
    }

    .content {
        padding: 20px 15px;
    }

    .form-section {
        padding: 20px 15px;
    }

    .unlock-code {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .toggle-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .navigation a {
        display: block;
        margin-bottom: 10px;
    }
}
