/* 
 * GoodGame.mom 主样式表
 * 采用苹果风格设计，注重简洁、优雅和用户体验
 */

/* 全局样式 */
:root {
    --primary-color: #6366f1; /* Indigo-500 */
    --primary-hover: #4f46e5; /* Indigo-600 */
    --secondary-color: #ec4899; /* Pink-500 */
    --text-primary: #111827; /* Gray-900 */
    --text-secondary: #4b5563; /* Gray-600 */
    --bg-color: #f9fafb; /* Gray-50 */
    --card-bg: #ffffff;
    --border-color: #e5e7eb; /* Gray-200 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-sm: 0.375rem; /* 6px */
    --radius-md: 0.5rem; /* 8px */
    --radius-lg: 0.75rem; /* 12px */
    --radius-xl: 1rem; /* 16px */
    --radius-2xl: 1.5rem; /* 24px */
    --radius-full: 9999px;
}

/* 苹果风格特殊效果 */
.frosted-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.frosted-glass-dark {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 游戏卡片悬停效果 */
.game-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
    transform: translateY(-5px);
}

/* 按钮效果 */
button, .btn {
    transition: all 0.2s ease;
}

button:active, .btn:active {
    transform: scale(0.97);
}

/* 自定义滚动条 (WebKit浏览器) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c5c5c5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a3a3a3;
}

/* 圆角图片 */
.rounded-apple {
    border-radius: 12px;
    overflow: hidden;
}

/* 搜索框特殊样式 */
.search-apple:focus {
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* 自定义动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 应用动画类 */
.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideUp {
    animation: slideUp 0.5s ease forwards;
}

/* 游戏容器样式 */
.game-iframe-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    background-color: var(--card-bg);
    transition: box-shadow 0.3s ease;
}

.game-iframe-container:hover {
    box-shadow: var(--shadow-lg);
}

.game-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* 分类卡片特效 */
.category-card {
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* 自定义表单元素样式 */
input, textarea, select {
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

/* 评论区样式 */
.comment-item {
    transition: background-color 0.2s ease;
}

.comment-item:hover {
    background-color: rgba(249, 250, 251, 0.8);
}

/* 响应式调整 */
@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .search-container {
        width: 100%;
    }
}

/* 全屏模式样式 */
.fullscreen-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 加载动画 */
.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    border: 3px solid;
    border-color: var(--primary-color) transparent var(--primary-color) transparent;
    animation: rotation 1.5s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 苹果风格标签 */
.apple-tag {
    display: inline-block;
    padding: 4px 10px;
    background-color: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.apple-tag:hover {
    background-color: rgba(99, 102, 241, 0.2);
}

/* 苹果风格卡片阴影 */
.apple-card {
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.apple-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-5px);
}

/* 苹果风格光泽效果 */
.apple-shine {
    position: relative;
    overflow: hidden;
}

.apple-shine::after {
    content: '';
    position: absolute;
    top: -110%;
    left: -210%;
    width: 200%;
    height: 200%;
    opacity: 0;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: opacity 0.5s ease;
}

.apple-shine:hover::after {
    opacity: 1;
    animation: shine 1.5s ease;
}

@keyframes shine {
    to {
        top: 110%;
        left: 110%;
    }
} 