/* Destiny 2 Tool Suite - Shared Theme 
    Unifies the visual language of the Armor Manager and Wishlist Generator
*/

/* --- Base Layout & Background --- */
body {
    background-color: #111827; /* Gray-900 base */
    color: #f3f4f6; /* Gray-100 text */
    /* Deep space radial gradient */
    background-image: radial-gradient(circle at top center, #1f2937 0%, #111827 100%);
    background-attachment: fixed; /* Keeps gradient in place while scrolling */
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #111827;
}

::-webkit-scrollbar-thumb {
    background: #4b5563; /* Gray-600 */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280; /* Gray-500 */
}

/* --- Glassmorphism Panels --- */
.glass-panel {
    background: rgba(31, 41, 55, 0.7); /* Gray-800 with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(75, 85, 99, 0.4); /* Gray-600 border */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* --- Typography --- */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #60a5fa, #818cf8, #a78bfa); /* Blue-400 -> Indigo-400 -> Purple-400 */
}

.text-gradient-header {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to bottom right, #60a5fa, #6366f1, #9333ea); /* Blue-400 -> Indigo-500 -> Purple-600 */
}

/* --- Component: Sticky Header --- */
.app-header {
    background: rgba(17, 24, 39, 0.85); /* Gray-900 high opacity */
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(55, 65, 81, 0.5);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* --- Component: Buttons --- */
.btn-primary {
    background-image: linear-gradient(to right, #2563eb, #4f46e5); /* Blue-600 -> Indigo-600 */
    color: white;
    font-weight: 700;
    border-radius: 0.5rem; /* rounded-lg */
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover:not(:disabled) {
    background-image: linear-gradient(to right, #3b82f6, #6366f1); /* Lighter Blue -> Lighter Indigo */
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.btn-secondary {
    background-color: #374151; /* Gray-700 */
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid #4b5563;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #4b5563; /* Gray-600 */
}

/* --- Component: Inputs --- */
.input-dark {
    background-color: #111827; /* Gray-900 */
    border: 1px solid #4b5563; /* Gray-600 */
    color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.input-dark:focus {
    outline: none;
    border-color: #3b82f6; /* Blue-500 */
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* --- Component: Toggle Switch --- */
.toggle-checkbox:checked {
    right: 0;
    border-color: #4ade80; /* Green-400 */
}
.toggle-checkbox:checked + .toggle-label {
    background-color: #4ade80;
}
.toggle-checkbox {
    right: 0;
    transition: all 0.2s ease-in-out;
    transform: translateX(-100%);
}
.toggle-checkbox:checked {
    transform: translateX(0);
}

/* --- Component: Loader --- */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top: 3px solid #60a5fa; /* Blue-400 */
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Drag & Drop Zone --- */
.drop-zone {
    transition: all 0.3s ease;
    border: 2px dashed rgba(75, 85, 99, 0.6);
    background-color: rgba(17, 24, 39, 0.3);
}

.drop-zone:hover {
    border-color: #60a5fa; /* Blue-400 */
    background-color: rgba(31, 41, 55, 0.5);
}

.drop-zone.dragover {
    background-color: rgba(37, 99, 235, 0.15);
    border-color: #3b82f6;
    transform: scale(1.01);
}

/* --- Animation Utilities --- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}