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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

header p {
    font-size: 1.1em;
    opacity: 0.9;
}

.container {
    display: flex;
    max-width: 1800px;
    margin: 20px auto;
    gap: 20px;
    padding: 0 20px;
}

.column {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.column-header {
    font-size: 2em;
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.male-header {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

.female-header {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.player-card {
    display: flex;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    border-left: 5px solid;
}

.player-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.male-card {
    background: linear-gradient(to right, #e0f2f7 0%, #ffffff 100%);
    border-left-color: #2193b0;
}

.female-card {
    background: linear-gradient(to right, #ffe6f0 0%, #ffffff 100%);
    border-left-color: #ee0979;
}

.player-rank {
    font-size: 2.5em;
    font-weight: bold;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.3;
}

.male-card .player-rank {
    color: #2193b0;
}

.female-card .player-rank {
    color: #ee0979;
}

.player-info {
    flex: 1;
}

.player-name {
    font-size: 1.4em;
    margin-bottom: 5px;
    color: #222;
}

.player-years {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.stat-box {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-label {
    font-size: 0.75em;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.stat-value {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

.stat-value.highlight {
    font-size: 1.3em;
    color: #d4af37;
}

.errors-section {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 5px;
}

.error-stat {
    display: flex;
    gap: 5px;
}

.error-label {
    font-size: 0.85em;
    color: #666;
}

.error-value {
    font-size: 0.85em;
    font-weight: bold;
    color: #333;
}

.accolades {
    padding: 10px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 5px;
    border-left: 3px solid #d4af37;
}

.accolades p {
    font-size: 0.85em;
    color: #555;
    line-height: 1.4;
}

@media (max-width: 1200px) {
    .container {
        flex-direction: column;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }

    .column-header {
        font-size: 1.5em;
    }

    .player-name {
        font-size: 1.2em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Player Link Styling */
.player-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Detail Page Styling */
.detail-page {
    min-height: 100vh;
}

.male-detail {
    background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%);
}

.female-detail {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
}

.detail-header {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.back-button {
    position: absolute;
    left: 20px;
    top: 30px;
}

.back-button a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    transition: opacity 0.2s;
}

.back-button a:hover {
    opacity: 0.7;
}

.detail-header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.player-subtitle {
    font-size: 1.2em;
    opacity: 0.8;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.player-hero {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    gap: 40px;
    align-items: center;
}

.headshot-container {
    flex-shrink: 0;
}

.player-headshot {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 8px solid #d4af37;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    flex: 1;
}

.hero-stat {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.hero-stat-label {
    display: block;
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-stat-value {
    display: block;
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

/* Biography Section */
.bio-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.bio-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.bio-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
}

/* Action Photos */
.action-photos {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.action-photos h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.action-photo {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.action-photo:hover {
    transform: scale(1.02);
}

.action-photo img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.photo-caption {
    padding: 15px;
    background: #f8f9fa;
}

.caption-text {
    font-size: 0.95em;
    color: #333;
    margin-bottom: 5px;
}

.caption-date {
    font-size: 0.85em;
    color: #999;
    font-style: italic;
}

/* Grand Slams Section */
.grand-slams-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.grand-slams-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.grand-slam-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 15px;
}

.grand-slam-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(to right, #fff9e6 0%, #ffffff 100%);
    border-radius: 8px;
    border-left: 4px solid #d4af37;
    transition: transform 0.2s, box-shadow 0.2s;
}

.grand-slam-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slam-trophy {
    font-size: 2em;
    flex-shrink: 0;
}

.slam-details {
    flex: 1;
}

.slam-tournament {
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
}

.slam-opponent {
    font-size: 0.95em;
    color: #666;
    margin-bottom: 5px;
}

.slam-score {
    font-size: 0.9em;
    color: #999;
    font-family: 'Courier New', monospace;
}

/* Stats Summary */
.stats-summary {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.stats-summary h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.stats-grid-detail {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-detail-box {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    text-align: center;
    color: white;
}

.stat-detail-label {
    font-size: 0.9em;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-detail-value {
    font-size: 2em;
    font-weight: bold;
}

/* Accolades Section */
.accolades-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.accolades-section h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 10px;
}

.accolades-text {
    font-size: 1.1em;
    line-height: 1.8;
    color: #555;
    background: rgba(212, 175, 55, 0.1);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #d4af37;
}

/* Responsive Design for Detail Page */
@media (max-width: 768px) {
    .detail-header h1 {
        font-size: 2em;
    }

    .player-hero {
        flex-direction: column;
        padding: 20px;
    }

    .player-headshot {
        width: 200px;
        height: 200px;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .photo-grid {
        grid-template-columns: 1fr;
    }

    .grand-slam-list {
        grid-template-columns: 1fr;
    }

    .stats-grid-detail {
        grid-template-columns: 1fr;
    }

    .back-button {
        position: static;
        margin-bottom: 15px;
    }
}
