/* Football Workout Tracker Styles */
:root {
    --primary: #1a365d;
    --primary-light: #2c5282;
    --secondary: #c53030;
    --accent: #d69e2e;
    --success: #38a169;
    --warning: #dd6b20;
    --danger: #e53e3e;
    --gray-50: #f7fafc;
    --gray-100: #edf2f7;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e0;
    --gray-400: #a0aec0;
    --gray-500: #718096;
    --gray-600: #4a5568;
    --gray-700: #2d3748;
    --gray-800: #1a202c;
    --white: #ffffff;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.header h1 span {
    color: var(--accent);
}

.nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav a:hover {
    background: rgba(255,255,255,0.1);
}

.nav .user-info {
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 140px);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: var(--gray-50);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-header h2, .card-header h3 {
    font-size: 1.125rem;
    color: var(--gray-700);
}

.card-body {
    padding: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-light);
}

.btn-secondary {
    background: var(--gray-500);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--gray-600);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #2f855a;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #c53030;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Position Selection Cards */
.position-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.position-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    border: 3px solid transparent;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.position-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.position-card.skill:hover {
    border-color: var(--accent);
}

.position-card.linemen:hover {
    border-color: var(--secondary);
}

.position-card .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.position-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.position-card p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

/* Week Navigator */
.week-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.week-btn {
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--gray-700);
}

.week-btn:hover {
    background: var(--gray-200);
}

.week-btn.active {
    background: var(--primary);
    color: var(--white);
}

.week-btn.completed {
    background: var(--success);
    color: var(--white);
}

.week-btn.partial {
    background: var(--warning);
    color: var(--white);
}

/* Day Cards */
.day-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.day-card {
    background: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border-left: 4px solid var(--gray-300);
}

.day-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.day-card.lower {
    border-left-color: var(--primary);
}

.day-card.upper {
    border-left-color: var(--accent);
}

.day-card.completed {
    border-left-color: var(--success);
    background: #f0fff4;
}

.day-card h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.day-card .body-part {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.day-card .status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
}

.day-card .status.completed {
    background: var(--success);
    color: var(--white);
}

.day-card .status.in-progress {
    background: var(--warning);
    color: var(--white);
}

.day-card .status.not-started {
    background: var(--gray-200);
    color: var(--gray-600);
}

/* Workout Table */
.workout-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.workout-table th,
.workout-table td {
    padding: 0.75rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.workout-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

.workout-table tr:hover {
    background: var(--gray-50);
}

.workout-table .exercise-name {
    font-weight: 500;
    min-width: 180px;
}

.workout-table .sets-reps {
    color: var(--gray-600);
    white-space: nowrap;
}

.workout-table input[type="number"],
.workout-table input[type="text"] {
    width: 60px;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    text-align: center;
}

.workout-table input[type="number"]:focus,
.workout-table input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
}

.workout-table .notes-input {
    width: 120px;
}

/* Progress Indicator */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: width 0.3s;
}

/* Player List (Coach View) */
.player-list {
    display: grid;
    gap: 1rem;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--white);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.player-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.player-info h4 {
    margin-bottom: 0.25rem;
}

.player-info .meta {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.player-stats {
    text-align: right;
}

.player-stats .completion {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border: 1px solid #fc8181;
}

.alert-info {
    background: #bee3f8;
    color: #2a4365;
    border: 1px solid #63b3ed;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.flex-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.25rem;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
    }
    
    .workout-table {
        font-size: 0.75rem;
    }
    
    .workout-table input[type="number"] {
        width: 50px;
        padding: 0.25rem;
    }
    
    .position-cards {
        grid-template-columns: 1fr;
    }
}

/* Login/Register specific */
.auth-container {
    max-width: 400px;
    margin: 3rem auto;
}

.auth-container .card {
    border-top: 4px solid var(--primary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--gray-600);
}

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

.auth-footer a:hover {
    text-decoration: underline;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .label {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tooltip for progression notes */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-800);
    color: var(--white);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Print styles */
@media print {
    .header, .nav, .btn, .week-nav {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
