/* // [AI IDE] Date: 2025-04-12 | Time: 11:33 | Action: Create | Purpose: Implement dark theme for TMT Login Registration system to match Metronome Trainer website; */

:root {
    /* Primary Colors */
    --primary: #CCFF00; /* Lime Green/Yellow for accents */
    --primary-dark: #AADD00;
    --secondary: #333333; /* Dark Charcoal for backgrounds */
    --secondary-light: #555555; /* Medium Gray for secondary backgrounds */
    --tertiary: #4D6082; /* Soft Blue as complementary accent */
    
    /* Functional Colors */
    --success: #33CC33; /* Success Green */
    --alert: #CC3333; /* Alert Red */
    
    /* UI Colors */
    --background: #222222; /* Darker background */
    --card-bg: #333333; /* Card background */
    --border-color: #444444; /* Border color */
    
    /* Text Colors */
    --text-primary: #FFFFFF; /* White text */
    --text-secondary: #DDDDDD; /* Light Gray text */
    --text-muted: #999999; /* Muted text */
    
    /* Preserve original variables with new mappings */
    --sky: var(--tertiary);
    --carbon: var(--text-secondary);
    --watermelon: var(--primary);
    --neutral: var(--secondary-light);
}

/* Base Styles */
body {
    background-color: var(--background);
    background-image: 
        linear-gradient(rgba(51, 51, 51, 0.7) 1px, transparent 1px),
        linear-gradient(90deg, rgba(51, 51, 51, 0.7) 1px, transparent 1px);
    background-size: 20px 20px;
    background-attachment: fixed;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-primary);
}

/* Card Styles */
.auth-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

/* Typography */
.auth-header h2 {
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.auth-footer, .form-text, .input-label {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.auth-footer a {
    color: var(--primary);
}

/* Form Elements */
.form-control {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    position: relative;
    z-index: 1;
}

.form-control:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.25rem rgba(204, 255, 0, 0.25);
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--secondary);
    border: none;
    position: relative;
    z-index: 1;
}

.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-dark);
    color: var(--secondary);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(204, 255, 0, 0.3);
}

/* Alerts */
.alert {
    position: relative;
    z-index: 1;
}

.alert-success {
    background-color: rgba(51, 204, 51, 0.1);
    color: var(--success);
    border-color: rgba(51, 204, 51, 0.2);
}

.alert-danger {
    background-color: rgba(204, 51, 51, 0.1);
    color: var(--alert);
    border-color: rgba(204, 51, 51, 0.2);
}

/* Bootstrap Overrides */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.card-header {
    background-color: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
    color: var(--primary);
    position: relative;
    z-index: 1;
}

.modal-content {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.modal-header, .modal-footer {
    border-color: var(--border-color);
    position: relative;
    z-index: 1;
}

.modal-title {
    color: var(--primary);
}

.table {
    color: var(--text-secondary);
}

.table-striped>tbody>tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.1);
}

.badge.bg-primary {
    background-color: var(--primary) !important;
    color: var(--secondary);
}

.btn-outline-secondary {
    color: var(--text-secondary);
    border-color: var(--border-color);
}

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

/* License Key Styling */
.license-key {
    background-color: rgba(0, 0, 0, 0.2);
    border-color: var(--border-color);
    color: var(--primary);
}

/* Additional Elements */
code {
    color: var(--primary);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* Contact Page Specific Styles */
.contact-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.contact-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.contact-title {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.contact-description {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.contact-btn {
    background-color: var(--primary);
    color: var(--secondary);
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.contact-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 255, 0, 0.3);
}

/* Status Alert Styling */
#statusAlert {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

#statusAlert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

#statusAlert.success {
    border-color: var(--success);
}

#statusAlert.error {
    border-color: var(--alert);
}

/* PayPal Integration Styles */
.paypal-container {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    max-width: 500px;
    margin: 2rem auto;
    position: relative;
    overflow: hidden;
}

.paypal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px),
        repeating-linear-gradient(90deg, transparent, transparent 19px, rgba(204, 255, 0, 0.03) 19px, rgba(204, 255, 0, 0.03) 20px);
    background-size: 20px 20px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.paypal-title {
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.paypal-price {
    color: var(--text-primary);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.paypal-description {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

#paypal-button-container {
    position: relative;
    z-index: 10 !important; /* Higher z-index to ensure visibility */
    margin: 1.5rem auto;
    min-height: 150px; /* Ensure container has height even before buttons load */
}

#paypal-button-container iframe {
    z-index: 10 !important;
    position: relative !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.paypal-footer {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Fix for bg-light class in Bootstrap */
.bg-light {
    background-color: var(--background) !important;
}

/* Fix for form-label in Bootstrap */
.form-label {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* Fix for readonly inputs */
.form-control[readonly] {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
}

/* Fix for modal close button */
.btn-close {
    filter: invert(1);
}

/* Fix for dropdown menus */
.dropdown-menu {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.dropdown-item {
    color: var(--text-secondary);
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: rgba(204, 255, 0, 0.1);
    color: var(--primary);
}

/* Fix for text-dark class */
.text-dark {
    color: var(--text-primary) !important;
}

/* Fix for text-muted class */
.text-muted {
    color: var(--text-muted) !important;
}

/* Fix for PayPal buttons */
/* // [AI IDE] Date: 2025-04-12 | Time: 12:38 | Action: Append | Purpose: Fix PayPal buttons visibility in dark theme; */

/* Fix price info colors for dark theme */
/* // [AI IDE] Date: 2025-04-12 | Time: 12:38 | Action: Change | Purpose: Update price info colors for dark theme; */
.price-info .description {
    color: var(--text-secondary) !important;
}

.price-info .price {
    color: var(--primary) !important;
    font-weight: bold;
}
