/* ==========================================
   SHODAN GAMES - PORTFOLIO STYLESHEET
   ========================================== */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    padding: 40px 20px;
    color: white;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 0.8s ease;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* Section Titles */
.section-title {
    color: white;
    font-size: 2em;
    margin: 40px 0 20px 0;
    padding-left: 10px;
    border-left: 5px solid #ffd700;
    animation: slideInLeft 0.6s ease;
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Game Card */
.game-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: fadeInUp 0.6s ease;
}

.game-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Stagger animation for game cards */
.game-card:nth-child(1) { animation-delay: 0.1s; }
.game-card:nth-child(2) { animation-delay: 0.2s; }
.game-card:nth-child(3) { animation-delay: 0.3s; }
.game-card:nth-child(4) { animation-delay: 0.4s; }
.game-card:nth-child(5) { animation-delay: 0.5s; }
.game-card:nth-child(6) { animation-delay: 0.6s; }

/* Game Thumbnail */
.game-thumbnail {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.game-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

.game-card:hover .game-thumbnail video {
    display: block;
}

.game-card:hover .game-thumbnail img {
    opacity: 0;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: all 0.3s ease;
    opacity: 0.8;
}

.game-card:hover .play-overlay {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.1);
}

.play-overlay::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #667eea;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

/* No Thumbnail Placeholder */
.no-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4em;
    color: rgba(255, 255, 255, 0.3);
}

/* Game Info */
.game-info {
    padding: 20px;
}

.game-title {
    font-size: 1.5em;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.game-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95em;
    min-height: 48px;
}

/* Game Tags */
.game-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag {
    background: #f0f0f0;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    color: #666;
    transition: all 0.3s ease;
}

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

/* Game Actions */
.game-actions {
    display: flex;
    gap: 10px;
}

.btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 0.95em;
}

.btn-play {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-source {
    background: #333;
    color: white;
}

.btn-source:hover {
    background: #555;
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 1200px;
    height: 80vh;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    animation: scaleIn 0.3s ease;
}

.modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5em;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 20px;
    color: white;
    margin-top: 60px;
}

footer p {
    margin-bottom: 10px;
}

footer a {
    color: #ffd700;
    text-decoration: none;
    margin: 0 10px;
    transition: all 0.3s ease;
}

footer a:hover {
    text-decoration: underline;
    color: #ffed4e;
}

/* Loading State */
.loading {
    text-align: center;
    color: white;
    font-size: 1.5em;
    padding: 40px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: white;
    padding: 60px 20px;
}

.empty-state h3 {
    font-size: 2em;
    margin-bottom: 20px;
}

.empty-state p {
    font-size: 1.2em;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

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

    header p {
        font-size: 1em;
    }

    .section-title {
        font-size: 1.5em;
    }

    .games-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .modal-content {
        width: 95%;
        height: 70vh;
    }

    .close-modal {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 1.2em;
    }

    .game-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    header {
        padding: 20px 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .game-thumbnail {
        height: 180px;
    }

    .game-info {
        padding: 15px;
    }

    .game-title {
        font-size: 1.3em;
    }

    footer {
        padding: 30px 10px;
    }

    footer a {
        display: block;
        margin: 10px 0;
    }
}