.game-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.game-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.game-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
}

.game-header p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.realm-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-item span:first-child {
    opacity: 0.8;
}

.info-value {
    font-weight: bold;
    font-size: 18px;
}

.breakthrough-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.requirements-header {
    margin-bottom: 15px;
}

.requirements-header h3 {
    margin: 0 0 5px 0;
    color: #333;
}

.requirements-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.stone-requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.stone-requirement {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    transition: all 0.3s ease;
}

.stone-requirement.satisfied {
    border-color: #4caf50;
    background: #e8f5e9;
}

.stone-requirement.not-satisfied {
    border-color: #f44336;
    background: #ffebee;
}

.status-icon {
    font-size: 18px;
}

.stone-name {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.stone-count {
    font-size: 14px;
    color: #666;
}

.other-requirements {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.req-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fafafa;
    color: #333;
}

.req-item.satisfied {
    border-color: #4caf50;
    background: #e8f5e9;
    color: #333;
}

.req-item.not-satisfied {
    border-color: #f44336;
    background: #ffebee;
    color: #333;
}

.base-info {
    display: flex;
    gap: 30px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 20px;
}

.base-info p {
    margin: 0;
    color: #666;
}

.base-info strong {
    color: #333;
}

.breakthrough-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.auto-breakthrough label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #555;
    user-select: none;
}

.auto-breakthrough input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.btn-breakthrough {
    padding: 12px 30px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-breakthrough:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-breakthrough:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.breakthrough-history {
    margin-top: 20px;
}

.breakthrough-history h3 {
    margin: 0 0 10px 0;
    color: #333;
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.empty-history {
    text-align: center;
    color: #999;
    padding: 30px;
    margin: 0;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s ease;
}

.history-item:hover {
    background: #fafafa;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.success {
    border-left: 4px solid #4caf50;
}

.history-item.failure {
    border-left: 4px solid #f44336;
}

.history-icon {
    font-size: 16px;
}

.history-realm {
    flex: 1;
    font-weight: 500;
    color: #333;
}

.history-result {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.history-item.success .history-result {
    background: #e8f5e9;
    color: #4caf50;
}

.history-item.failure .history-result {
    background: #ffebee;
    color: #f44336;
}

.history-time {
    font-size: 12px;
    color: #999;
}

.breakthrough-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.breakthrough-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.breakthrough-modal.show .modal-content {
    transform: scale(1);
}

.modal-header h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
}

.animation-container {
    margin-bottom: 20px;
}

.animation-frame {
    width: 200px;
    height: 200px;
    margin: 0 auto 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.current-emoji {
    font-size: 80px;
    line-height: 1;
    animation: pulse 1s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.animation-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.animation-progress .progress-bar {
    flex: 1;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.animation-progress .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s linear;
    border-radius: 5px;
}

.animation-progress .progress-text {
    min-width: 40px;
    text-align: right;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.modal-footer p {
    margin: 0;
    color: #666;
    font-size: 16px;
    min-height: 24px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-message {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    background: #333;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.toast-message.show {
    transform: translateX(0);
    opacity: 1;
}

.toast-message.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast-message.success {
    background: #4caf50;
}

.toast-message.error {
    background: #f44336;
}

.toast-message.warning {
    background: #ff9800;
}

.toast-message.info {
    background: #2196f3;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

@media (max-width: 768px) {
    .game-container {
        margin: 10px auto;
        padding: 10px;
    }
    
    .game-header {
        padding: 15px;
        margin-bottom: 15px;
        border-radius: 8px;
    }
    
    .game-header h2 {
        font-size: 1.25rem;
    }
    
    .game-header p {
        font-size: 0.875rem;
    }

    .realm-info {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
    }
    
    .info-value {
        font-size: 16px;
    }

    .breakthrough-section {
        padding: 15px;
        border-radius: 8px;
    }
    
    .requirements-header h3 {
        font-size: 16px;
    }
    
    .stone-requirements {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .stone-requirement {
        padding: 10px 12px;
    }
    
    .stone-name {
        font-size: 14px;
    }
    
    .stone-count {
        font-size: 13px;
    }

    .other-requirements {
        gap: 8px;
        margin-bottom: 12px;
    }
    
    .req-item {
        padding: 8px 12px;
    }

    .base-info {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        margin-bottom: 15px;
    }

    .breakthrough-controls {
        flex-direction: column;
        gap: 15px;
        padding: 12px;
    }
    
    .btn-breakthrough {
        padding: 10px 24px;
        font-size: 15px;
        width: 100%;
    }
    
    .breakthrough-history h3 {
        font-size: 16px;
    }
    
    .history-item {
        padding: 8px 12px;
    }
    
    .history-realm {
        font-size: 14px;
    }

    .modal-content {
        padding: 20px;
    }
    
    .modal-header h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .animation-frame {
        width: 150px;
        height: 150px;
    }

    .current-emoji {
        font-size: 60px;
    }

    .history-time {
        display: none;
    }
    
    .toast-message {
        padding: 10px 16px;
        font-size: 13px;
    }
}
