/* Design System & Premium Aesthetics for TrackIt */

:root {
    --bg-dark: #09090b;
    --bg-card: #141417;
    --bg-input: #1f1f23;
    --primary: #8a2be2;
    --primary-light: #a855f7;
    --primary-gradient: linear-gradient(135deg, #8a2be2 0%, #4a00e0 100%);
    --accent: #00f2fe;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border-color: #27272a;
    --nav-bg: rgba(9, 9, 11, 0.85);
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Gradient text */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* Custom Alert styling */
.alert {
    border-radius: 12px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Glassmorphism Navigation */
.navbar {
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    transition: color 0.25s ease, transform 0.2s ease;
    padding: 0.5rem 1rem !important;
    border-radius: 20px;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(138, 43, 226, 0.1);
}

/* Premium Card Design */
.card-premium {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -20px rgba(138, 43, 226, 0.25);
    border-color: rgba(138, 43, 226, 0.4);
}

/* Inputs & Form Controls */
.form-control, .form-select {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.25) !important;
    outline: none;
}

.form-control::placeholder {
    color: #4b5563 !important;
}

/* Buttons */
.btn-primary {
    background: var(--primary-gradient) !important;
    border: none !important;
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-outline-primary {
    border-color: var(--primary-light) !important;
    color: var(--primary-light) !important;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: var(--primary-gradient) !important;
    border-color: transparent !important;
    color: var(--text-primary) !important;
}

/* Table Design */
.table {
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent !important;
}

.table th {
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
}

.table tbody tr {
    background-color: #1a1a1e;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #222227 !important;
    transform: scale(1.005);
}

.table td {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.table td:first-child {
    border-left: 1px solid var(--border-color);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.table td:last-child {
    border-right: 1px solid var(--border-color);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Badges */
.badge-custom {
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-weight { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.badge-reps { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge-time { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-distance { background: rgba(236, 72, 153, 0.15); color: #f472b6; }

/* Timeline for History */
.timeline {
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: calc(-2rem - 6px);
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-light);
    box-shadow: 0 0 10px var(--primary-light);
}

.timeline-date {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* Workout Planner Planner List */
.min-h-300 {
    min-height: 350px;
}

.planner-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    cursor: grab;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.planner-card.completed {
    border-left: 4px solid #10b981;
    background-color: rgba(16, 185, 129, 0.03);
}

.planner-card:active {
    cursor: grabbing;
}

.planner-card-placeholder {
    border: 2px dashed var(--primary-light);
    background-color: rgba(138, 43, 226, 0.05);
    border-radius: 12px;
    height: 100px;
}

.drag-handle {
    cursor: grab;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 0 0.5rem;
}

/* Modals */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #27272a;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}
