/* 
   Friday Night Funkin' Website Styles
   Using Apple-inspired color palette
*/

/* Base Styles and Variables */
:root {
    /* Apple-inspired color palette */
    --primary-color: #007AFF; /* Apple Blue */
    --secondary-color: #5AC8FA; /* Apple Light Blue */
    --accent-color: #FF2D55; /* Apple Pink */
    --background-color: #F2F2F7; /* Apple Light Gray */
    --dark-background: #1C1C1E; /* Apple Dark Gray */
    --text-color: #000000; /* Apple Black */
    --text-secondary: #8E8E93; /* Apple Gray */
    --success-color: #34C759; /* Apple Green */
    --warning-color: #FF9500; /* Apple Orange */
    --danger-color: #FF3B30; /* Apple Red */
    --white: #FFFFFF;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

section {
    padding: 60px 0;
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Header and Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 15px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
    padding: 80px 0;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.tagline {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Game Section */
.game-section {
    padding: 40px 0;
}

.game-container {
    display: flex;
    gap: 30px;
}

.game-wrapper {
    flex: 1;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.game-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.sidebar {
    width: 300px;
}

/* Rating System */
.rating-system {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.stars {
    font-size: 24px;
    color: #FFD700; /* Gold color for stars */
    margin: 10px 0;
}

.star {
    display: inline-block;
    position: relative;
}

.star.filled {
    color: #FFD700;
}

.star.half-filled {
    position: relative;
}

.star.half-filled:after {
    content: "★";
    color: #FFD700;
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    overflow: hidden;
}

.rating-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.rating-value {
    font-size: 1.2rem;
    font-weight: bold;
}

.votes-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Social Share */
.social-share {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-3px);
}

.facebook {
    background-color: #3b5998;
}

.twitter {
    background-color: #1da1f2;
}

.reddit {
    background-color: #ff4500;
}

.pinterest {
    background-color: #bd081c;
}

.linkedin {
    background-color: #0077b5;
}

.instagram {
    background: linear-gradient(45deg, #405de6, #5851db, #833ab4, #c13584, #e1306c, #fd1d1d);
}

.youtube {
    background-color: #ff0000;
}

/* Ad Spaces */
.ad-space {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.ad-placeholder {
    padding: 20px;
    color: var(--text-secondary);
    text-align: center;
}

.ad-sidebar {
    height: 250px;
    margin-bottom: 20px;
}

.ad-horizontal {
    height: 90px;
    width: 100%;
}

.ad-section {
    padding: 20px 0;
}

/* Loading Indicator */
.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    z-index: 10;
    border-radius: var(--border-radius);
    transition: opacity 0.5s ease;
}

.loading-indicator.fade-out {
    opacity: 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* About Section */
.about-section {
    background-color: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.feature-item {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow);
}

.feature-item h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* How to Play Section */
.how-to-play-section {
    background-color: var(--background-color);
}

.how-to-play-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.how-to-play-item {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.how-to-play-item:hover {
    transform: translateY(-5px);
}

.how-to-play-item h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.controls-list {
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-top: 30px;
}

.control-item {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
}

.control-key {
    background-color: var(--dark-background);
    color: var(--white);
    padding: 5px 10px;
    border-radius: 4px;
    margin-right: 15px;
    font-family: monospace;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

.control-desc {
    flex: 1;
}

/* Discussion Section */
.discuss-section {
    background-color: var(--white);
}

.discussion-board {
    background-color: var(--background-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--box-shadow);
}

.login-register {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 30px;
}

.comment-form textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    resize: vertical;
    margin-bottom: 15px;
    font-family: inherit;
}

.comments-list {
    margin-bottom: 20px;
}

.comment {
    background-color: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.user-name {
    font-weight: bold;
    color: var(--primary-color);
}

.comment-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.comment-footer {
    margin-top: 15px;
}

.comment-actions {
    display: flex;
    gap: 15px;
}

.comment-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.comment-actions button:hover {
    color: var(--primary-color);
}

.comment-replies {
    margin-left: 30px;
    margin-top: 15px;
}

.reply {
    border-left: 3px solid var(--primary-color);
}

.load-more {
    text-align: center;
}

.load-more-btn {
    background-color: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
}

.load-more-btn:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Footer */
footer {
    background-color: var(--dark-background);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    flex: 1;
    min-width: 200px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 15px;
}

.footer-links {
    flex: 1;
    min-width: 200px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: var(--transition);
}

.footer-social .social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .game-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        padding-top: 30px;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links li {
        margin: 15px 0;
    }
    
    .hamburger {
        display: flex;
        z-index: 1000;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .how-to-play-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .rating-system, .social-share {
        margin-bottom: 15px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .comment-actions button {
        font-size: 0.8rem;
    }
    
    .comment-replies {
        margin-left: 15px;
    }
}

@media (max-width: 576px) {
    section {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
    
    .control-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .control-key {
        margin-bottom: 5px;
    }
    
    .comment-actions {
        flex-wrap: wrap;
    }
    
    .game-wrapper {
        padding-bottom: 75%; /* Adjust aspect ratio for better mobile viewing */
    }
    
    .sidebar {
        margin-top: 20px;
    }
    
    .stars {
        font-size: 20px;
    }
    
    .share-buttons {
        gap: 8px;
    }
    
    .share-btn {
        width: 36px;
        height: 36px;
    }
    
    .discussion-board {
        padding: 20px 15px;
    }
    
    .login-register {
        flex-direction: column;
        gap: 10px;
    }
    
    .login-register .btn {
        width: 100%;
    }
}
