/* Git Game Styles */
.game-page {
    background-color: var(--light-color);
    color: var(--text-color);
}

/* Game Hero Section */
.game-hero {
    background: linear-gradient(135deg, #2b3137 0%, #24292e 100%);
    padding: 60px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.game-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path fill="%23ffffff10" d="M50 0L100 50L50 100L0 50z"/></svg>');
    background-size: 30px 30px;
    opacity: 0.1;
}

.game-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.game-hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

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

.game-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Terminal Section */
.terminal-section {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.terminal-section h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-align: center;
}

.terminal-description {
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-color);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.terminal-help {
    margin-top: 20px;
}

.terminal-help h4 {
    color: var(--text-color);
    margin-bottom: 10px;
}

.command-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.command-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

.command-tag:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Visualization Section */
.visualization-section {
    display: flex;
    gap: 30px;
}

/* Game Sidebar */
.game-sidebar {
    width: 300px;
    flex-shrink: 0;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.level-selector h3,
.game-instructions h3,
.game-score h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.level-selector ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.level-selector .level {
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: var(--bg-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    color: var(--text-color);
}

.level-selector .level:hover {
    background-color: var(--hover-color);
}

.level-selector .level.active {
    background-color: var(--hover-color);
    border-left-color: var(--primary-color);
    font-weight: 500;
}

.level-selector .level.completed {
    border-left-color: #4caf50;
}

.level-selector .level.completed::after {
    content: "✓";
    color: #4caf50;
    float: right;
}

.game-instructions {
    margin-top: 30px;
}

.game-instructions p {
    margin-bottom: 15px;
    line-height: 1.5;
    color: var(--text-color);
}

.instructions-text {
    color: var(--text-color);
}

.task-list {
    color: var(--text-color);
    padding-left: 20px;
}

.task-list li {
    margin-bottom: 8px;
}

.completed-task {
    color: #4caf50;
    font-weight: 500;
}

.game-score {
    margin-top: 30px;
}

/* Game Main Area */
.game-main {
    flex: 1;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Git Visualization */
.git-visualization {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.working-directory,
.staging-area,
.repository {
    flex: 1;
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.working-directory h3,
.staging-area h3,
.repository h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    text-align: center;
    color: var(--primary-color);
}

.file-list {
    min-height: 150px;
}

.file-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: var(--card-bg);
    border-radius: 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.file-item:hover {
    background-color: var(--hover-color);
}

.file-item i {
    margin-right: 10px;
    color: var(--primary-color);
}

.file-item.modified i {
    color: #ff9800;
}

.file-item.added i {
    color: #4caf50;
}

.file-item.deleted i {
    color: #f44336;
}

.commit-history {
    min-height: 150px;
    display: flex;
    flex-direction: column-reverse;
}

.commit-item {
    padding: 8px 12px;
    margin-bottom: 8px;
    background-color: var(--card-bg);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
    color: var(--text-color);
}

.commit-hash {
    font-family: monospace;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.commit-message {
    margin-top: 5px;
    font-weight: 500;
}

/* Branch Visualization */
.branch-visualization {
    background-color: var(--bg-color);
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.branch-visualization h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1rem;
    text-align: center;
    color: var(--primary-color);
}

.branch-tree {
    min-height: 100px;
    position: relative;
    padding: 20px 0;
}

.branch {
    position: relative;
    height: 4px;
    background-color: var(--primary-color);
    margin-bottom: 30px;
}

.branch.main-branch {
    background-color: #4caf50;
}

.branch.feature-branch {
    background-color: #2196f3;
}

.branch-label {
    position: absolute;
    top: -25px;
    left: 0;
    background-color: var(--card-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color);
}

.branch-label.main {
    background-color: #4caf50;
    color: white;
}

.branch-label.feature {
    background-color: #2196f3;
    color: white;
}

.branch-commit {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--card-bg);
    border: 3px solid var(--primary-color);
    top: -8px;
    transform: translateY(-50%);
    cursor: pointer;
    transition: all 0.2s ease;
}

.branch-commit:hover {
    transform: translateY(-50%) scale(1.2);
}

.branch-commit.main {
    border-color: #4caf50;
}

.branch-commit.feature {
    border-color: #2196f3;
}

.branch-commit.merge {
    border-color: #9c27b0;
}

/* Terminal */
.terminal {
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
    max-width: 100%;
    height: 350px;
    display: flex;
    flex-direction: column;
}

.terminal-header {
    background-color: #323232;
    padding: 10px 15px;
    display: flex;
    align-items: center;
}

.terminal-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.terminal-header .dot.red {
    background-color: #ff5f56;
}

.terminal-header .dot.yellow {
    background-color: #ffbd2e;
}

.terminal-header .dot.green {
    background-color: #27c93f;
}

.terminal-title {
    margin-left: 10px;
    color: #ddd;
    font-size: 0.9rem;
}

.terminal-body {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    color: #ddd;
    line-height: 1.5;
    scrollbar-width: thin;
    scrollbar-color: #444 #1e1e1e;
}

.terminal-input-container {
    display: flex;
    align-items: center;
    padding: 0 15px 15px;
    background-color: #1e1e1e;
}

.terminal-input-container .prompt {
    color: #4caf50;
    margin-right: 10px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

#terminal-input {
    flex: 1;
    background-color: transparent;
    border: none;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    outline: none;
}

.terminal-command {
    color: #fff;
    margin-bottom: 5px;
}

.terminal-command::before {
    content: "$ ";
    color: #4caf50;
}

.terminal-output {
    color: #bbb;
    margin-bottom: 10px;
}

.terminal-output.success {
    color: #4caf50;
}

.terminal-output.error {
    color: #f44336;
}

.terminal-output.warning {
    color: #ff9800;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.game-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.game-btn i {
    margin-right: 8px;
}

.game-btn:hover {
    background-color: var(--primary-dark);
}

.game-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#hint-btn {
    background-color: #ff9800;
}

#hint-btn:hover {
    background-color: #f57c00;
}

#reset-btn {
    background-color: #f44336;
}

#reset-btn:hover {
    background-color: #d32f2f;
}

/* Game Help Section */
.game-help {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
}

.game-help h2 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.command-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.command-card {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    color: var(--text-color);
}

.command-card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.command-card ul {
    padding-left: 20px;
}

.command-card li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.command-card code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .git-visualization {
        flex-direction: column;
    }
    
    .working-directory,
    .staging-area,
    .repository {
        margin-bottom: 15px;
    }
}

@media (max-width: 900px) {
    .game-container {
        flex-direction: column;
    }
    
    .game-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        margin-bottom: 30px;
    }
}

/* Dark Mode Support */
[data-theme="dark"] .terminal {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Game Floating Button (already in main CSS) */
.game-float-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
}

.game-float-button:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.game-float-button i {
    font-size: 1.5rem;
}

.game-tooltip {
    position: absolute;
    right: 75px;
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.game-float-button:hover .game-tooltip {
    opacity: 1;
    visibility: visible;
}
