/* 
 * Royal Rummy Website Styles
 * Modern, clean design with card game aesthetic
 */

/* === Base Styles === */
:root {
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --accent-color: #f7b801;
    --light-color: #f1faee;
    --dark-color: #1d3557;
    --text-color: #333;
    --light-text: #f1faee;
    --gray-color: #6c757d;
    --light-gray: #f8f9fa;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

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

/* === Header === */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    color: var(--light-text);
}

.logo span {
    color: var(--accent-color);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.nav-menu a:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu a.active {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

.profile-icon {
    font-size: 1.5rem;
}

.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--light-text);
}

/* === Hero Section === */
.hero {
    position: relative;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-text);
    padding-top: 80px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/pattern.png');
    opacity: 0.1;
    animation: patternMove 20s linear infinite;
}

@keyframes patternMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 100% 100%;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Glitch Effect */
.glitch {
    font-size: 4rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
        0.025em 0.04em 0 #fffc00;
    animation: glitch 725ms infinite;
}

.glitch span {
    position: absolute;
    top: 0;
    left: 0;
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
            0.025em 0.04em 0 #fffc00;
    }

    15% {
        text-shadow: 0.05em 0 0 #00fffc, -0.03em -0.04em 0 #fc00ff,
            0.025em 0.04em 0 #fffc00;
    }

    16% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
            -0.05em -0.05em 0 #fffc00;
    }

    49% {
        text-shadow: -0.05em -0.025em 0 #00fffc, 0.025em 0.035em 0 #fc00ff,
            -0.05em -0.05em 0 #fffc00;
    }

    50% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
            0 -0.04em 0 #fffc00;
    }

    99% {
        text-shadow: 0.05em 0.035em 0 #00fffc, 0.03em 0 0 #fc00ff,
            0 -0.04em 0 #fffc00;
    }

    100% {
        text-shadow: -0.05em 0 0 #00fffc, -0.025em -0.04em 0 #fc00ff,
            -0.04em -0.025em 0 #fffc00;
    }
}

/* Typing Effect */
.typing-text {
    font-size: 1.5rem;
    margin: 2rem 0;
    overflow: hidden;
    border-right: 2px solid var(--accent-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0
    }

    to {
        width: 100%
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent
    }

    50% {
        border-color: var(--accent-color)
    }
}

.cta-buttons {
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 1s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Featured Games Section === */
.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--dark-text);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.section-text {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

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

.game-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.game-image {
    height: 220px;
    overflow: hidden;
}

.game-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.game-card:hover .game-image img {
    transform: scale(1.1);
}

.game-content {
    padding: 1.5rem;
}

.game-title {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.game-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

.game-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.game-rating {
    display: flex;
    align-items: center;
    color: var(--accent-color);
}

.game-rating i {
    margin-right: 0.5rem;
}

.game-platforms {
    display: flex;
    gap: 0.5rem;
}

.game-platforms i {
    font-size: 1.2rem;
    color: var(--gray-color);
}

/* === Features Section === */
.features {
    background-color: var(--light-gray);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background-color: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
}

.feature-title {
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.feature-text {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* === Testimonials Section === */
.testimonials {
    background-color: var(--secondary-color);
    color: var(--light-text);
}

.testimonials .section-title {
    color: white;
}

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

.testimonial-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.testimonial-content {
    font-size: 1.2rem;
    line-height: 1.8;
}

.testimonial-content::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -20px;
    left: -10px;
    opacity: 0.2;
    color: var(--accent-color);
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    border: 3px solid var(--accent-color);
}

.author-name {
    font-size: 1.2rem;
}

.author-title {
    font-size: 1rem;
}

/* === Call to Action Section === */
.cta {
    background: linear-gradient(to right, var(--primary-color), #f27474);
    color: white;
    text-align: center;
}

.cta-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-text {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* === Footer === */
footer {
    background-color: var(--dark-color);
    color: var(--light-text);
    padding: 4rem 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-column h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
}

.footer-column p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    font-size: 1.1rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

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

.footer-bottom {
    margin-top: 3rem;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
    text-align: center;
}

.footer-bottom p {
    opacity: 0.7;
}

/* === Games Page Styles === */
.page-header {
    height: 40vh;
    min-height: 300px;
    background: linear-gradient(to right, rgba(29, 53, 87, 0.9), rgba(29, 53, 87, 0.7)), url('../images/games-header.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text);
    position: relative;
}

.header-content {
    text-align: center;
    max-width: 800px;
    padding: 0 1rem;
}

.game-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background-color: var(--light-gray);
    color: var(--text-color);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: inherit;
    font-weight: 500;
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}

.featured-game {
    background: linear-gradient(to right, var(--secondary-color), #2a4374);
    color: white;
    border-radius: 15px;
    overflow: hidden;
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.featured-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.featured-image {
    height: 100%;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-info {
    padding: 3rem;
}

.featured-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.featured-desc {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.featured-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-title {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.3rem;
}

.meta-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
}

/* === Contact Page Styles === */
.contact-section {
    padding: 5rem 0;
}

.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.contact-text p {
    color: var(--gray-color);
}

.contact-form {
    background-color: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: inherit;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 4rem;
}

/* === About Page Styles === */
.about-section {
    padding: 5rem 0;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
    align-items: center;
}

.about-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.about-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.about-info p {
    margin-bottom: 1.5rem;
    color: var(--gray-color);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
}

.team-section {
    background-color: var(--light-gray);
    padding: 5rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.team-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-10px);
}

.team-image {
    height: 250px;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-info {
    padding: 1.5rem;
    text-align: center;
}

.team-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.team-position {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.team-text {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Policy pages */
.policy-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.policy-container h2 {
    color: var(--secondary-color);
    margin: 2rem 0 1rem;
}

.policy-container h3 {
    color: var(--primary-color);
    margin: 1.5rem 0 1rem;
}

.policy-container p,
.policy-container ul {
    margin-bottom: 1rem;
    color: var(--gray-color);
}

.policy-container ul {
    padding-left: 2rem;
}

.policy-container ul li {
    list-style-type: disc;
    margin-bottom: 0.5rem;
}

.policy-toc {
    background-color: var(--light-gray);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.policy-toc h3 {
    margin-top: 0;
}

.policy-toc ul {
    margin-bottom: 0;
}

.policy-toc ul li {
    margin-bottom: 0.5rem;
}

.policy-toc a {
    color: var(--primary-color);
}

.policy-toc a:hover {
    text-decoration: underline;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
}

/* FAQ Section */
.faq-section {
    padding: 5rem 0;
    background-color: var(--light-gray);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: white;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--secondary-color);
}

.faq-question i {
    transition: var(--transition);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.show {
    padding: 0 1.5rem 1.5rem;
}

.faq-question.active+.faq-answer {
    max-height: 500px;
}

/* Responsive styles */
@media (max-width: 992px) {
    .featured-content {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .header-container {
        padding: 1rem 0;
    }

    .logo {
        font-size: 1.8rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .nav-menu a {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .section-text {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
    }

    .hero {
        height: 60vh;
        padding-top: 60px;
    }

    .glitch {
        font-size: 2.5rem;
    }

    .typing-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 50vh;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-menu a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

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

    .section-text {
        font-size: 1rem;
    }
}

/* 为内页的导航栏添加用户头像样式 */
.nav-links .user-profile {
    margin-left: 1.5rem;
}

.nav-links .profile-icon {
    font-size: 1.8rem;
    color: var(--light-text);
    transition: var(--transition);
}

.nav-links .profile-icon:hover {
    color: var(--accent-color);
}

/* 添加内页主体内容的顶部边距 */
.about-hero,
.contact-hero,
.policy-hero {
    margin-top: 80px;
}