/* Team Sermath Section Styles */
.team-sermath {
    background-color: #0c0c14;
    position: relative;
    overflow: hidden;
    padding: 100px 0;
    border-top: 1px solid rgba(255, 123, 0, 0.2);
    border-bottom: 1px solid rgba(255, 123, 0, 0.2);
    color: var(--text-color);
}

/* Space-themed background for Team Sermath section */
.team-sermath::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 123, 0, 0.03) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(255, 123, 0, 0.03) 0%, transparent 20%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 100% 100%, 100% 100%, 200px 200px;
    opacity: 1;
    z-index: 0;
    pointer-events: none;
}

/* Team header */
.team-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 1;
}

.team-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    background-color: rgba(30, 30, 30, 0.8);
    border-radius: 50%;
    padding: 15px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(255, 123, 0, 0.3);
    overflow: hidden;
}

.team-logo img {
    width: 100%;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
}

.team-tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: -20px;
    margin-bottom: 30px;
}

/* Team content */
.team-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Team section styling */
.team-section {
    background-color: rgba(20, 20, 30, 0.6);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.team-section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
    text-shadow: 0 0 20px rgba(255, 123, 0, 0.3);
    background: linear-gradient(135deg, var(--primary-color), #ff9500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.team-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #ff9500);
    box-shadow: 0 0 10px var(--primary-color);
}


/* Team About styling */
.team-about {
    color: var(--text-color);
}

.team-about p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.team-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(255, 123, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Team Games styling */
.team-games {
    display: flex;
    flex-direction: column;
    gap: 40px;
    position: relative;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 123, 0, 0.02) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 123, 0, 0.02) 0%, transparent 40%),
        linear-gradient(135deg, rgba(30, 30, 40, 0.1) 0%, rgba(30, 30, 40, 0.05) 100%);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.team-games::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--primary-color), 
        #ff9500, 
        var(--primary-color), 
        transparent);
    border-radius: 2px;
    opacity: 0.6;
    animation: steamDivider 3s ease-in-out infinite;
}

.team-games::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, 
        transparent 30%, 
        rgba(255, 123, 0, 0.1) 40%, 
        rgba(255, 123, 0, 0.2) 50%, 
        rgba(255, 123, 0, 0.1) 60%, 
        transparent 70%);
    border-radius: 50%;
    opacity: 0.5;
    animation: steamCornerAccent 4s ease-in-out infinite;
}

@keyframes steamDivider {
    0%, 100% {
        width: 60px;
        opacity: 0.6;
    }
    50% {
        width: 120px;
        opacity: 1;
    }
}

@keyframes steamCornerAccent {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: rotate(180deg) scale(1.2);
        opacity: 0.6;
    }
}

/* Steam Game Embed Card styling */
.team-game-card {
    background-color: rgba(30, 30, 40, 0.7);
    border-radius: 15px;
    overflow: visible; /* Allow shadow effects to be visible */
    border: 2px solid rgba(255, 255, 255, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(30px);
    animation: steamCardAppear 0.8s ease-out forwards, steamFloat 6s ease-in-out infinite;
    will-change: transform, box-shadow;
}

.team-game-card:nth-child(1) {
    animation-delay: 0.2s;
}

.team-game-card:nth-child(2) {
    animation-delay: 0.4s;
}

.team-game-card:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes steamCardAppear {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    60% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes steamFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-2px) rotate(0.2deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(-1px) rotate(-0.2deg);
    }
}

.team-game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(255, 123, 0, 0.03) 0%, 
        rgba(255, 123, 0, 0.01) 50%, 
        rgba(255, 123, 0, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.team-game-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        transparent 0%, 
        rgba(255, 123, 0, 0.1) 25%, 
        rgba(255, 123, 0, 0.2) 50%, 
        rgba(255, 123, 0, 0.1) 75%, 
        transparent 100%);
    border-radius: 17px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.team-game-card:hover::before {
    opacity: 1;
}

.team-game-card:hover::after {
    opacity: 1;
    animation: steamGlow 2s ease-in-out infinite alternate;
}

@keyframes steamGlow {
    0% { 
        opacity: 0.3;
        transform: scale(1);
    }
    100% { 
        opacity: 0.6;
        transform: scale(1.01);
    }
}

.team-game-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 123, 0, 0.4);
    animation-play-state: paused;
}

/* Loading animation for Steam widgets */
.team-game-card iframe {
    width: 100% !important;
    height: 190px !important;
    border: none;
    border-radius: 13px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    background-color: rgba(40, 40, 50, 0.8);
    background-image: 
        linear-gradient(90deg, transparent, rgba(255, 123, 0, 0.1), transparent),
        linear-gradient(45deg, #2a2a3a 25%, transparent 25%, transparent 75%, #2a2a3a 75%);
    background-size: 100% 100%, 20px 20px;
    animation: steamLoading 1.5s ease-in-out;
    will-change: filter;
}

@keyframes steamLoading {
    0% { 
        background-position: -100% 0, 0 0;
        opacity: 0.7;
    }
    50% { 
        background-position: 100% 0, 0 0;
        opacity: 0.9;
    }
    100% { 
        background-position: 100% 0, 0 0;
        opacity: 1;
    }
}

.team-game-card:hover iframe {
    filter: brightness(1.1) contrast(1.05);
}

.game-img {
    width: 300px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.game-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-game-card:hover .game-img img {
    transform: scale(1.05);
}

.game-info {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-info h4 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.game-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.game-platform, .game-release {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
}

.game-platform::before {
    content: '\f390'; /* Computer symbol */
    font-family: 'Font Awesome 5 Free';
    margin-right: 5px;
    color: var(--primary-color);
}

.game-release::before {
    content: '\f133'; /* Calendar symbol */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 5px;
    color: var(--primary-color);
}

.game-info p {
    margin-bottom: 20px;
    flex-grow: 1;
    color: var(--text-muted);
    line-height: 1.6;
}

.game-links {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Team footer */
.team-footer {
    margin-top: 60px;
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 1;
}

.team-website-link {
    display: inline-flex;
    align-items: center;
    padding: 12px 25px;
    background-color: rgba(255, 123, 0, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.team-website-link i {
    margin-left: 8px;
    font-size: 0.9rem;
}

.team-website-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 123, 0, 0.3);
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.team-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(30, 30, 40, 0.7);
    color: var(--text-muted);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-social a:hover {
    color: white;
    background-color: var(--primary-color);
    transform: translateY(-3px) rotate(10deg);
    box-shadow: 0 10px 20px rgba(255, 123, 0, 0.3);
}

/* Enhanced accessibility and interaction for Steam embeds */
.team-game-card[data-game] {
    position: relative;
}

.team-game-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 4px;
    border-color: var(--primary-color);
}

.team-game-card iframe:focus {
    outline: none; /* Remove default iframe outline since parent handles it */
}

/* Add subtle game-specific styling */
.team-game-card[data-game="clean-go"]:hover::before {
    background: linear-gradient(135deg, 
        rgba(255, 123, 0, 0.05) 0%, 
        rgba(0, 255, 150, 0.02) 50%, 
        rgba(255, 123, 0, 0.05) 100%);
}

.team-game-card[data-game="agd"]:hover::before {
    background: linear-gradient(135deg, 
        rgba(255, 123, 0, 0.05) 0%, 
        rgba(150, 0, 255, 0.02) 50%, 
        rgba(255, 123, 0, 0.05) 100%);
}

/* Performance optimization for animations */
.team-game-card {
    will-change: transform, box-shadow;
}

.team-game-card iframe {
    will-change: filter;
}

/* Ensure smooth animations on all devices */
@media (prefers-reduced-motion: reduce) {
    .team-game-card {
        animation: none;
        transition: none;
    }
    
    .team-game-card:hover {
        transform: none;
    }
    
    .team-games::before,
    .team-games::after {
        animation: none;
    }
}

/* Mobile-first approach for touch devices */
@media (hover: none) and (pointer: coarse) {
    .team-game-card:hover {
        /* Remove hover effects on touch devices */
        transform: none;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.08);
    }
    
    .team-game-card:hover::before,
    .team-game-card:hover::after {
        opacity: 0;
    }
    
    .team-game-card:hover iframe {
        filter: none;
    }
    
    /* Add tap effect instead */
    .team-game-card:active {
        transform: scale(0.98);
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .team-games {
        gap: 20px;
        padding: 15px;
        border-radius: 15px;
    }
    
    .team-game-card {
        flex-direction: column;
        margin: 0;
        border-radius: 12px;
        /* Reduce intensive effects on mobile */
        backdrop-filter: blur(5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        /* Disable floating animation on mobile */
        animation: steamCardAppear 0.8s ease-out forwards;
    }
    
    .team-game-card:hover {
        /* Reduce hover effects on mobile for better performance */
        transform: translateY(-2px) scale(1.005);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
    }
    
    .team-game-card iframe {
        height: 190px !important;
        width: 100% !important;
        border-radius: 10px;
    }
    
    .game-img {
        width: 100%;
        height: 200px;
    }
    
    .team-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .stat-item {
        margin-bottom: 20px;
    }
    
    .team-section {
        padding: 30px 15px;
    }
    
    /* Reduce decorative elements on mobile */
    .team-games::after {
        top: 10px;
        right: 10px;
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 600px) {
    .team-games {
        gap: 15px;
        padding: 12px;
    }
    
    .team-game-card {
        margin: 0;
        border-radius: 10px;
        /* Further reduce effects for smaller screens */
        backdrop-filter: blur(3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    }
    
    .team-game-card:hover {
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }
    
    .team-game-card iframe {
        height: 180px !important;
        width: 100% !important;
        border-radius: 8px;
    }
    
    .team-section {
        padding: 25px 10px;
    }
}

@media (max-width: 480px) {
    .team-game-card {
        margin: 0;
        border-radius: 8px;
        /* Minimal effects for very small screens */
        backdrop-filter: blur(2px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    
    .team-game-card:hover {
        /* Minimal hover effect */
        transform: none;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    }
    
    .team-game-card iframe {
        height: 170px !important;
        border-radius: 6px;
        width: 100% !important;
        margin: 0;
    }
    
    .team-games {
        gap: 12px;
        padding: 10px;
        border-radius: 10px;
    }
    
    .team-games::before {
        top: -12px;
        width: 35px;
    }
    
    .team-games::after {
        display: none; /* Hide corner accent on small screens */
    }
    
    .team-section {
        padding: 20px 8px;
    }
}

/* Extra small screens (narrow phones) */
@media (max-width: 360px) {
    .team-game-card {
        border-radius: 6px;
        /* Minimal styling for very narrow screens */
        backdrop-filter: none;
        background-color: rgba(30, 30, 40, 0.9);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }
    
    .team-game-card:hover {
        transform: none;
        box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
    }
    
    .team-game-card iframe {
        height: 160px !important;
        border-radius: 4px;
    }
    
    .team-games {
        padding: 8px;
        gap: 10px;
        border-radius: 8px;
    }
    
    .team-section {
        padding: 15px 5px;
    }
    
    .team-games::before {
        display: none; /* Hide decorative elements */
    }
}

/* Landscape phone optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .team-game-card iframe {
        height: 150px !important;
    }
    
    .team-games {
        gap: 10px;
    }
}

/* Performance optimization for mobile devices */
@media (max-width: 768px) {
    .team-game-card::before,
    .team-game-card::after {
        display: none; /* Remove decorative pseudo-elements on mobile */
    }
    
    .team-game-card {
        /* Disable will-change on mobile to save memory */
        will-change: auto;
    }
    
    .team-game-card iframe {
        will-change: auto;
    }
}
