* {
    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;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    max-width: 800px;
    width: 100%;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: 300;
}

.form-group {
    margin-bottom: 30px;
}

label {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-weight: 500;
}

input[type="url"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

.button-group {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    margin: 20px 0;
}

.results {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    display: none;
}

.results.show {
    display: block;
}

.point-summary {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 5px solid #28a745;
}

.point-summary.invalid {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.total-points {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
}

.total-points.invalid {
    color: #dc3545;
}

.pointed-cards {
    background: white;
    border-radius: 10px;
    padding: 20px;
}

.pointed-cards h3 {
    margin-bottom: 15px;
    color: #333;
}

.card-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

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

.card-name {
    font-weight: 500;
}

.card-points {
    background: #667eea;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.error {
    background: #fff5f5;
    color: #dc3545;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid #dc3545;
}

.card-config {
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 30px;
    overflow: hidden;
}

.config-header {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    padding: 20px 20px 0 20px;
    cursor: pointer;
    user-select: none;
}

.config-header h3 {
    margin: 0;
    color: #333;
}

.toggle-btn {
    background: none;
    border: none;
    font-size: 10px;
    color: #667eea;
    cursor: pointer;
    padding: 0;
    border-radius: 2px;
    transition: all 0.3s ease;
    margin-right: 8px;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    background: #e9ecef;
}

.config-content {
    padding: 0 20px 20px 20px;
    max-height: 400px;
    overflow-y: auto;
    transition: all 0.3s ease;
}

.config-content.collapsed {
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

label input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

label {
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #555;
    font-weight: 500;
}

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

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

@media (max-width: 600px) {
    .container {
        padding: 20px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .button-group {
        flex-direction: column;
    }
}
