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

:root {
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 10px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.game-info {
    font-size: 0.95rem;
    opacity: 0.85;
    font-weight: 500;
}

.back-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-3px);
}

/* Language Switcher */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-select {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    padding: 6px 10px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.language-select:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.language-select option {
    background: var(--primary-color);
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    width: 100%;
}

/* Section */
.section {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.section h2 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* Case Section */
.case-section {
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    margin: 0;
}

.selected-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.selected-count strong {
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Search Box */
.search-box {
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Cases Scroll Area */
.cases-scroll {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding-right: 5px;
}

.cases-scroll::-webkit-scrollbar {
    width: 8px;
}

.cases-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.cases-scroll::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.cases-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.case-card {
    display: flex;
    align-items: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
}

.case-card:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
}

.case-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-right: 10px;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.case-card label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.case-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.case-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.3;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-secondary);
    padding: 40px 20px;
    font-size: 1rem;
}

/* Result Section */
.result-section {
    display: flex;
    flex-direction: column;
}

.result-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.hint {
    text-align: center;
    color: var(--text-secondary);
    padding: 30px 20px;
    font-size: 1rem;
}

.url-display {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.url-display textarea {
    width: 100%;
    flex: 1;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    resize: none;
    margin-bottom: 12px;
    line-height: 1.5;
}

.url-display textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.button-group {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #38a169;
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 15px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.info-box h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.info-box ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.info-box ol li {
    margin-bottom: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.warning {
    color: #e53e3e;
    font-weight: 500;
    margin-top: 8px;
    font-size: 0.85rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-weight: 500;
    transform: translateX(400px);
    transition: var(--transition);
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .container {
        height: auto;
    }
    
    .main-content {
        overflow: visible;
    }
    
    .section {
        max-height: none;
    }
    
    .cases-scroll {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        height: auto;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }
    
    .game-info {
        font-size: 0.85rem;
    }

    .section {
        padding: 15px;
    }

    .section h2 {
        font-size: 1.1rem;
    }
    
    .cases-scroll {
        grid-template-columns: 1fr;
        max-height: 300px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
    
    .header-top {
        flex-direction: column;
        gap: 10px;
    }
}

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

.section {
    animation: fadeIn 0.5s ease-out;
}

.case-card {
    animation: fadeIn 0.3s ease-out;
}
