/
dayekb
/
vibecoding_gomoku
Обзор
Документация
Войти
/
dayekb
/
vibecoding_gomoku
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
style.css
638 строк
12 KB
dayekb
upload files
03 сен 2025, 21:49
03 сен 2025, 21:49
a1c536b
Код
Авторство
О чём код?
* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: 'Inter', sans-serif; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); min-height: 100vh; color: #333; overflow-x: auto; } .container { max-width: 1400px; margin: 0 auto; padding: 20px; } .header { text-align: center; margin-bottom: 30px; color: white; } .header h1 { font-size: 3rem; font-weight: 700; margin-bottom: 10px; text-shadow: 2px 2px 4px rgba(0,0,0,0.3); } .header p { font-size: 1.2rem; opacity: 0.9; } .game-controls { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; margin-bottom: 30px; } .settings-panel { background: rgba(255, 255, 255, 0.95); padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); backdrop-filter: blur(10px); } .settings-panel h3 { margin-bottom: 20px; color: #4a5568; font-size: 1.3rem; } /* Основные настройки */ .settings-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-bottom: 20px; } .theme-row { display: flex; justify-content: flex-start; margin-bottom: 20px; padding: 10px 0; } .setting-group { margin-bottom: 20px; } .setting-group.compact { margin-bottom: 0; } .setting-group label { display: block; margin-bottom: 8px; font-weight: 500; color: #2d3748; font-size: 0.9rem; } .setting-group.compact label { margin-bottom: 5px; font-size: 0.85rem; } .setting-group select { width: 100%; padding: 10px 12px; border: 2px solid #e2e8f0; border-radius: 8px; font-size: 0.9rem; background: white; transition: all 0.3s ease; } .setting-group.compact select { padding: 8px 10px; font-size: 0.85rem; } .setting-group select:focus { outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); } /* Настройки иконок */ .icon-settings { min-width: 280px; } .icon-selection { display: flex; flex-direction: column; gap: 20px; } .icon-group { display: flex; flex-direction: column; gap: 10px; } .icon-group label { font-size: 0.9rem; font-weight: 600; color: #4a5568; margin-bottom: 0; } .icon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; } .icon-option { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid #e2e8f0; border-radius: 8px; background: white; cursor: pointer; transition: all 0.2s ease; font-size: 1.2rem; margin: 0; } .icon-option:hover { border-color: #667eea; background: #f7fafc; transform: scale(1.05); } input[type="radio"] { display: none; } input[type="radio"]:checked + .icon-option { border-color: #667eea; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; transform: scale(1.1); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3); } .btn { padding: 15px 30px; border: none; border-radius: 12px; font-size: 1.1rem; font-weight: 600; cursor: pointer; transition: all 0.3s ease; text-transform: uppercase; letter-spacing: 0.5px; } .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4); } .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6); } .game-info { background: rgba(255, 255, 255, 0.95); padding: 25px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.2); backdrop-filter: blur(10px); } .current-player { text-align: center; margin-bottom: 25px; padding: 20px; background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); border-radius: 15px; color: white; } .current-player span { display: block; font-size: 1.2rem; font-weight: 600; } #currentPlayerIcon { font-size: 2.5rem; margin-top: 10px; } .game-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; } .stat { text-align: center; padding: 15px; background: #f7fafc; border-radius: 12px; border: 2px solid #e2e8f0; } .stat-label { display: block; font-size: 0.9rem; color: #718096; margin-bottom: 5px; } .stat span:last-child { font-size: 1.5rem; font-weight: 700; color: #2d3748; } .game-board-container { display: flex; justify-content: center; margin-bottom: 30px; } .game-board { display: grid; gap: 3px; background: #2d3748; padding: 10px; border-radius: 15px; box-shadow: 0 15px 35px rgba(0,0,0,0.3); } .cell { width: 60px; height: 60px; background: white; border: none; border-radius: 8px; font-size: 2rem; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0,0,0,0.1); } .cell:hover { background: #f7fafc; transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.2); } .cell:disabled { cursor: not-allowed; opacity: 0.7; } .cell.player { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); color: white; animation: placeIcon 0.3s ease; } .cell.ai { background: linear-gradient(135deg, #fa709a 0%, #fee140 100%); color: white; animation: placeIcon 0.3s ease; } .cell.winning { background: linear-gradient(135deg, #ff6b6b 0%, #ffa500 100%); animation: winningCell 0.6s ease infinite alternate; } @keyframes placeIcon { 0% { transform: scale(0.8); opacity: 0; } 50% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } } @keyframes winningCell { 0% { transform: scale(1); } 100% { transform: scale(1.05); } } .game-messages { text-align: center; } .message { background: rgba(255, 255, 255, 0.95); padding: 20px 30px; border-radius: 15px; font-size: 1.3rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,0.2); backdrop-filter: blur(10px); min-height: 60px; display: flex; align-items: center; justify-content: center; } .message.win { background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%); color: white; } .message.lose { background: linear-gradient(135deg, #f87171 0%, #ef4444 100%); color: white; } .message.draw { background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%); color: white; } .message.info { background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%); color: white; } /* Адаптивность */ @media (max-width: 1200px) { .game-controls { grid-template-columns: 1fr; gap: 20px; } .icon-settings { min-width: auto; } .cell { width: 50px; height: 50px; font-size: 1.5rem; } } @media (max-width: 900px) { .settings-row { grid-template-columns: repeat(2, 1fr); } .icon-grid { grid-template-columns: repeat(6, 1fr); } } @media (max-width: 768px) { .container { padding: 15px; } .header h1 { font-size: 2rem; } .settings-row { grid-template-columns: 1fr; } .icon-grid { grid-template-columns: repeat(4, 1fr); } .cell { width: 40px; height: 40px; font-size: 1.2rem; } .game-stats { grid-template-columns: 1fr; } } @media (max-width: 480px) { .cell { width: 35px; height: 35px; font-size: 1rem; } .settings-panel, .game-info { padding: 20px; } } /* Анимации загрузки */ .loading { opacity: 0.6; pointer-events: none; } .loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2px solid #667eea; border-top: 2px solid transparent; border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } /* Переключатель темы */ .theme-toggle-label { display: flex; align-items: center; cursor: pointer; font-weight: 500; color: #2d3748; gap: 10px; font-size: 0.9rem; white-space: nowrap; padding: 8px 12px; border-radius: 8px; transition: background-color 0.2s ease; } .theme-toggle-label:hover { background-color: rgba(102, 126, 234, 0.05); } .theme-toggle { display: none; } .theme-toggle-slider { position: relative; width: 44px; height: 22px; background: #e2e8f0; border-radius: 11px; transition: all 0.3s ease; border: 2px solid #cbd5e0; flex-shrink: 0; } .theme-toggle-slider::before { content: ''; position: absolute; top: 1px; left: 1px; width: 16px; height: 16px; background: white; border-radius: 50%; transition: all 0.3s ease; box-shadow: 0 2px 4px rgba(0,0,0,0.2); } .theme-toggle:checked + .theme-toggle-slider { background: #667eea; border-color: #667eea; } .theme-toggle:checked + .theme-toggle-slider::before { transform: translateX(22px); background: #f7fafc; } /* Темная тема */ body.dark-theme { background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); color: #e2e8f0; } body.dark-theme .settings-panel, body.dark-theme .game-info { background: rgba(45, 55, 72, 0.95); color: #e2e8f0; } body.dark-theme .settings-panel h3 { color: #cbd5e0; } body.dark-theme .setting-group label { color: #e2e8f0; } body.dark-theme .setting-group select { background: #2d3748; border-color: #4a5568; color: #e2e8f0; } body.dark-theme .setting-group select:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2); } body.dark-theme .icon-group label { color: #cbd5e0; } body.dark-theme .icon-option { background: #2d3748; border-color: #4a5568; color: #e2e8f0; } body.dark-theme .icon-option:hover { border-color: #667eea; background: #4a5568; } body.dark-theme input[type="radio"]:checked + .icon-option { border-color: #667eea; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; } body.dark-theme .theme-toggle-label { color: #e2e8f0; } body.dark-theme .theme-toggle-label:hover { background-color: rgba(102, 126, 234, 0.1); } body.dark-theme .stat { background: #2d3748; border-color: #4a5568; } body.dark-theme .stat-label { color: #a0aec0; } body.dark-theme .stat span:last-child { color: #e2e8f0; } body.dark-theme .game-board { background: #1a202c; } body.dark-theme .cell { background: #2d3748; color: #e2e8f0; } body.dark-theme .cell:hover { background: #4a5568; } body.dark-theme .message { background: rgba(45, 55, 72, 0.95); color: #e2e8f0; } body.dark-theme .message.win { background: linear-gradient(135deg, #38a169 0%, #2f855a 100%); color: white; } body.dark-theme .message.lose { background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%); color: white; } body.dark-theme .message.draw { background: linear-gradient(135deg, #805ad5 0%, #6b46c1 100%); color: white; } body.dark-theme .message.info { background: linear-gradient(135deg, #d97706 0%, #b45309 100%); color: white; } /* Анимация переключения темы */ body { transition: background 0.3s ease, color 0.3s ease; } .settings-panel, .game-info, .game-board, .cell, .message, .stat { transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease; }