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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

main {
    padding: 40px 30px;
}

.character-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.attacker-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.attacker-section h3 {
    color: #667eea;
    margin-bottom: 0;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.defender-section {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    display: flex;
    flex-direction: column;
}

.defender-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.filter-controls {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
}

.filter-item {
    margin-bottom: 20px;
}

.filter-item:last-of-type {
    margin-bottom: 15px;
}

.filter-item label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 10px;
}

.filter-item label span {
    color: #667eea;
    font-weight: 700;
}

.range-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.range-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.range-label {
    font-size: 0.85rem;
    color: #888;
    min-width: 35px;
    font-weight: 600;
}

.range-input input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e0e0e0;
    outline: none;
    -webkit-appearance: none;
}

.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    transition: all 0.2s;
}

.range-input input[type="range"]::-webkit-slider-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.range-input input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.range-input input[type="range"]::-moz-range-thumb:hover {
    background: #5568d3;
    transform: scale(1.1);
}

.range-input input[type="number"] {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 600;
}

.range-input input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
}

.technique-count {
    background: #f5f5ff;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 8px;
    text-align: center;
    border: 1px solid #e0e0ff;
}

.technique-count span {
    color: #667eea;
    font-weight: 700;
    font-size: 0.95rem;
}

.filter-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.reset-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
}

.reset-btn:hover {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.selector-group {
    display: flex;
    flex-direction: column;
}

.selector-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.95rem;
}

select {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
}

select[size] {
    padding: 5px;
    width: 100%;
    max-height: 400px;
}

select[size] option {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
}

select[size] option:hover {
    background: #f5f5ff;
}

select:hover {
    border-color: #667eea;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.analyze-btn {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 15px;
}

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

.analyze-btn:active {
    transform: translateY(0);
}

.analyze-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    color: #667eea;
    font-size: 1.1rem;
}

.results {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    max-height: 800px;
    overflow-y: auto;
}

.results h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.info-text {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #555;
}

.filter-options {
    margin-bottom: 20px;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
}

.filter-options label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
}

.filter-options input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.technique-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.technique-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.technique-card.punishable {
    border-color: #4caf50;
    background: #f1f8f4;
}

.technique-card.not-punishable {
    opacity: 0.7;
}

.technique-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.technique-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.frame-advantage {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 5px 15px;
    border-radius: 6px;
    background: #ff5252;
    color: white;
}

.frame-advantage.safe {
    background: #ffa726;
}

.technique-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 4px;
}

.detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.punish-list {
    margin-top: 15px;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 8px;
    border-left: 4px solid #4caf50;
}

.punish-list h4 {
    color: #2e7d32;
    margin-bottom: 10px;
    font-size: 1rem;
}

.punish-item {
    padding: 8px 0;
    border-bottom: 1px solid #c8e6c9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.punish-technique {
    font-weight: 600;
    color: #333;
}

.punish-frames {
    display: flex;
    gap: 10px;
    font-size: 0.9rem;
}

.punish-startup {
    color: #2e7d32;
    font-weight: 600;
}

.punish-damage {
    color: #ff6f00;
    font-weight: 600;
}

.no-punish {
    color: #ff5252;
    font-weight: 600;
    padding: 10px;
    text-align: center;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #c62828;
}

footer {
    background: #f5f5f5;
    padding: 20px;
    text-align: center;
    color: #888;
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .character-selection {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .technique-details {
        grid-template-columns: 1fr;
    }

    main {
        padding: 20px 15px;
    }
    
    .results {
        max-height: none;
    }
}

