/*
Tennis Style CSS - Main Theme Styles
For Alia's Tennis Tracker WordPress Theme
Version: 1.0.0
*/

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* === CONTAINER & LAYOUT === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.tennis-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* === HEADER STYLES === */
.site-header {
    background: linear-gradient(135deg, #2c5282 0%, #1a365d 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-branding a {
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.site-branding a:hover {
    color: #4299e1;
    text-decoration: none;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #4299e1;
}

.header-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.current-level {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* === CARDS & COMPONENTS === */
.tennis-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tennis-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.tennis-card h2 {
    color: #2c5282;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #4299e1;
    padding-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tennis-card h3 {
    color: #2c5282;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.tennis-card h4 {
    color: #2c5282;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

/* === PAGE HEADERS === */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 2px solid #e2e8f0;
}

.page-header h1 {
    color: #2c5282;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    color: #4a5568;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* === FORM STYLES === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.form-section h3 {
    margin-bottom: 1.5rem;
    color: #2c5282;
    text-align: center;
}

.form-actions {
    text-align: center;
    margin: 2rem 0;
}

/* === BUTTON STYLES === */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    color: white;
}

.btn-outline {
    background: transparent;
    color: #4299e1;
    border: 2px solid #4299e1;
}

.btn-outline:hover {
    background: #4299e1;
    color: white;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* === ALERT STYLES === */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.alert-success {
    background: #c6f6d5;
    color: #2f855a;
    border: 2px solid #9ae6b4;
}

.alert-error {
    background: #fed7d7;
    color: #c53030;
    border: 2px solid #feb2b2;
}

.alert-info {
    background: #bee3f8;
    color: #2b6cb0;
    border: 2px solid #90cdf4;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
}

.alert-close:hover {
    opacity: 1;
}

/* === COUNTER STYLES === */
.counter-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.counter-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
}

.counter-label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.counter-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.counter-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #4299e1;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.counter-btn:hover {
    background: #3182ce;
    transform: scale(1.1);
}

.counter-btn:active {
    transform: scale(0.95);
}

.counter-btn.minus {
    background: #f56565;
}

.counter-btn.minus:hover {
    background: #e53e3e;
}

.counter-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c5282;
    min-width: 60px;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

/* === AGGRESSIVE MARGIN DISPLAY === */
.am-section {
    text-align: center;
    padding: 2rem;
    margin: 2rem 0;
}

.am-main-display {
    margin: 2rem 0;
}

.am-value {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.am-level {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.am-formula {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 2rem;
}

.am-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    background: rgba(255,255,255,0.1);
    padding: 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,0.1);
    padding: 0.75rem;
    border-radius: 8px;
}

.breakdown-label {
    font-weight: 600;
}

/* === LEVEL SPECIFIC COLORS === */
.level-champion {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2d3748;
}

.level-excellent {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.level-very-good {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.level-good {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.level-building {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
}

/* === MATCH RESULT STYLES === */
.result-display {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-align: center;
    margin: 1rem 0;
    transition: all 0.3s ease;
}

.result-display.in-progress {
    background: #bee3f8;
    color: #2b6cb0;
}

.result-display.win {
    background: #c6f6d5;
    color: #2f855a;
    animation: celebration 0.5s ease;
}

.result-display.loss {
    background: #fed7d7;
    color: #c53030;
}

.result-display.deciding {
    background: #fefcbf;
    color: #744210;
    animation: pulse 1s infinite;
}

@keyframes celebration {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* === PROGRESS BAR STYLES === */
.progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4299e1, #48bb78);
    border-radius: 6px;
    transition: width 0.5s ease;
}

/* === SCORE TRACKING STYLES === */
.score-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.score-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    font-size: 2rem;
    font-weight: bold;
}

.player-score {
    text-align: center;
    padding: 1rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.player-name {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

.sets-score {
    color: #2c5282;
}

.vs-separator {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    color: #4a5568;
}

/* === TRAINING SPECIFIC STYLES === */
.skills-grid, .fitness-grid, .mental-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.skill-group, .fitness-group, .mental-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.skill-group label, .fitness-group label, .mental-group label {
    font-weight: 600;
    color: #2d3748;
    font-size: 1.1rem;
}

.rating-scale {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.skill-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

.skill-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4299e1;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.skill-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #4299e1;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.rating-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #4a5568;
}

.rating-value {
    font-weight: bold;
    color: #2c5282;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    background: white;
    border-radius: 4px;
    border: 2px solid #4299e1;
}

.summary-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.overall-score {
    text-align: center;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.score-circle .score-number {
    font-size: 2rem;
    line-height: 1;
}

.score-circle.score-excellent {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.score-circle.score-good {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.score-circle.score-average {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.score-circle.score-poor {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
}

.score-circle small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.summary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.breakdown-value {
    font-weight: bold;
    color: #2c5282;
}

/* === GOALS & CHALLENGES STYLES === */
.radio-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.radio-option:hover {
    background: #e2e8f0;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

/* === DASHBOARD SPECIFIC STYLES === */
.performance-banner {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 20px;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.performance-banner.champion {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #2d3748;
}

.performance-banner.excellent {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
}

.performance-banner.very-good {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
}

.performance-banner.good-progress {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
}

.performance-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.level-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.level-emoji {
    font-size: 4rem;
}

.level-info h2 {
    margin: 0 0 0.5rem 0;
    font-size: 2rem;
    border: none;
}

.am-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.level-description {
    font-size: 1.2rem;
    font-style: italic;
    max-width: 300px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.overview-stat {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 3px solid transparent;
    transition: transform 0.3s ease;
}

.overview-stat:hover {
    transform: translateY(-4px);
}

.overview-stat.champion {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fffbf0 0%, #fff8e1 100%);
}

.overview-stat.excellent {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
}

.overview-stat.very-good {
    border-color: #4299e1;
    background: linear-gradient(135deg, #ebf8ff 0%, #e6fffa 100%);
}

.overview-stat.good {
    border-color: #ed8936;
    background: linear-gradient(135deg, #fffaf0 0%, #fef5e7 100%);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1rem;
}

/* === FOOTER STYLES === */
.site-footer {
    background: #2d3748;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #4299e1;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section a {
    color: #a0aec0;
    text-decoration: none;
    line-height: 1.8;
}

.footer-section a:hover {
    color: #4299e1;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #4a5568;
    color: #a0aec0;
}

/* === MOBILE RESPONSIVE STYLES === */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .tennis-card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 12px;
        border-left: none;
        border-right: none;
    }
    
    .page-header {
        margin: 0 -10px 2rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .tennis-card h2 {
        font-size: 1.5rem;
    }
    
    .am-value {
        font-size: 2.5rem;
    }
    
    .am-level {
        font-size: 1.1rem;
    }
    
    .counter-group {
        gap: 0.5rem;
    }
    
    .counter-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .counter-value {
        font-size: 1.1rem;
        padding: 0.3rem 0.6rem;
        min-width: 40px;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .header-content {
        justify-content: space-between;
    }
    
    .score-display {
        flex-direction: column;
        gap: 1rem;
        font-size: 1.5rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .skills-grid, .fitness-grid, .mental-grid {
        grid-template-columns: 1fr;
    }
    
    .summary-display {
        flex-direction: column;
        gap: 2rem;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 1.5rem;
    }
    
    .performance-content {
        flex-direction: column;
        text-align: center;
    }
    
    .level-display {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.75rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .counter-section {
        grid-template-columns: 1fr;
    }
    
    .breakdown-item {
        min-width: auto;
    }
}

/* === UTILITIES === */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
    40%, 43% { transform: translate3d(0, -30px, 0); }
    70% { transform: translate3d(0, -15px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    to { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8), 0 0 30px rgba(255, 215, 0, 0.6); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.slide-up {
    animation: slideUp 0.3s ease forwards;
}

.bounce {
    animation: bounce 1s ease;
}

.glow {
    animation: glow 2s ease-in-out infinite alternate;
}

/* === PRINT STYLES === */
@media print {
    .tennis-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .btn,
    .counter-btn,
    .alert-close,
    .mobile-menu-toggle {
        display: none;
    }
    
    .site-header,
    .site-footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .tennis-page {
        padding: 0;
    }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === CUSTOM SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #4299e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3182ce;
}