/* DETAIL PAGES STYLES (Player, Manager, Coach, News) */

/* Stories Section for Detail Pages - Same as Homepage */
.stories-section {
    margin: 0;
    padding: 0;
    position: relative;
}

.stories-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.stories {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap !important;
    gap: 8px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    padding: 8px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pinch-zoom;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    cursor: grab;
    user-select: none;
}

.stories:active {
    cursor: grabbing;
}

.stories::-webkit-scrollbar {
    display: none !important;
}

.story-control-button {
    background: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    min-width: 32px !important;
    width: 32px !important;
    height: 36px !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.75;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 0;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: opacity 0.2s, transform 0.2s;
}

.story-control-button:hover {
    opacity: 1;
    transform: scale(1.1);
}

.story-control-prev {
    margin-right: 8px;
}

.story-control-next {
    margin-left: 8px;
}

.story-control-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.story-hidden {
    display: none !important;
}

.story {
    width: 82px;
    height: 82px;
    border: 2px solid #063a68;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.story:hover {
    transform: scale(1.1);
}

.story-image {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.story img,
.story-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-video {
    display: block;
}

.story-title {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story:hover .story-title {
    opacity: 1;
}

/* Story Viewer Styles - Same as Homepage */
.story-viewer {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
}

.story-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
}

.story-viewer-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    height: 100%;
    max-height: 700px;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.story-viewer-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), transparent);
}

.story-viewer-progress {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.story-progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.1s linear;
}

.story-viewer-controls {
    position: absolute;
    top: 20px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 11;
}

.story-viewer-mute-btn,
.story-viewer-pause-btn,
.story-viewer-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s;
    border: none;
    outline: none;
    padding: 0;
}

.story-viewer-mute-btn:hover,
.story-viewer-pause-btn:hover,
.story-viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.story-viewer-mute-btn:active,
.story-viewer-pause-btn:active,
.story-viewer-close:active {
    transform: scale(0.95);
}

.story-viewer-mute-btn svg,
.story-viewer-pause-btn svg {
    display: block;
}

.story-viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.story-viewer-media {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer-image,
.story-viewer-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.story-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
}

.story-viewer-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.story-viewer-prev {
    left: 16px;
}

.story-viewer-next {
    right: 16px;
}

.story-viewer-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    z-index: 10;
}

.story-viewer-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 768px) {
    .story-viewer-container {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
    }

    .story-viewer-nav {
        width: 40px;
        height: 40px;
    }

    .story-viewer-prev {
        left: 8px;
    }

    .story-viewer-next {
        right: 8px;
    }
}

/* Common Detail Page Styles */
.player-detail-page,
.manager-detail-page,
.coach-detail-page,
.news-detail-page {
    min-height: 100vh;
    background: #f8f9fa;
}

.player-detail-page .container,
.manager-detail-page .container,
.coach-detail-page .container,
.news-detail-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.news-detail-page .container {
    max-width: 800px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: #5a6fd8;
}

.breadcrumb-separator {
    margin: 0 10px;
    color: #666;
}

.breadcrumb-current {
    color: #333;
    font-weight: 500;
}

/* Detail Header */
.player-detail-header,
.manager-detail-header,
.coach-detail-header {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.player-main-info,
.manager-main-info,
.coach-main-info {
    display: flex;
    align-items: center;
    gap: 30px;
    flex: 1;
}

.player-photo-large,
.manager-photo-large,
.coach-photo-large {
    font-size: 4rem;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.player-basic-info h1,
.manager-basic-info h1,
.coach-basic-info h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 10px;
}

.player-position,
.coach-club {
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.manager-agency {
    color: #667eea;
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.player-club,
.manager-nationality,
.coach-nationality {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.player-rating-large,
.manager-rating-large,
.coach-rating-large {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    text-align: center;
    display: inline-block;
}

.rating-value-large {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.rating-label-large {
    font-size: 0.9rem;
    opacity: 0.9;
}

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

.detail-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 3px solid #667eea;
    padding-bottom: 10px;
    display: inline-block;
}

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

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.detail-value {
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* News Detail Styles */
.article-header {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.article-category {
    background: #667eea;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.article-date,
.article-read-time {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.article-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.3;
}

.article-author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 1rem;
}

.author-label {
    font-weight: 600;
}

.author-name {
    color: #333;
    font-weight: 500;
}

.article-content {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}

.article-footer {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tag {
    background: #f8f9fa;
    color: #667eea;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.tag:hover {
    background: #667eea;
    color: white;
}

.article-stats {
    display: flex;
    gap: 30px;
    color: #666;
    font-size: 0.9rem;
}

.article-stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .player-detail-header,
    .manager-detail-header,
    .coach-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .player-main-info,
    .manager-main-info,
    .coach-main-info {
        flex-direction: column;
        text-align: center;
    }

    .player-basic-info h1,
    .manager-basic-info h1,
    .coach-basic-info h1 {
        font-size: 2rem;
    }

    .detail-section {
        padding: 20px;
    }

    .detail-section h2 {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .article-content {
        padding: 20px;
    }

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

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

@media (max-width: 480px) {
    .player-photo-large,
    .manager-photo-large,
    .coach-photo-large {
        width: 80px;
        height: 80px;
        font-size: 3rem;
    }

    .player-basic-info h1,
    .manager-basic-info h1,
    .coach-basic-info h1 {
        font-size: 1.5rem;
    }

    .article-title {
        font-size: 1.5rem;
    }

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

