* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 40px 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: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    font-size: 16px;
    opacity: 0.9;
}

.main-content {
    padding: 30px;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: monospace;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s;
}

textarea:focus {
    outline: none;
    border-color: #667eea;
}

button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #28a745;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.result-header h3 {
    color: #28a745;
    font-size: 18px;
}

.copy-btn {
    background: #6c757d;
    padding: 8px 16px;
    font-size: 14px;
    width: auto;
}

.copy-btn:hover {
    background: #5a6268;
}

.result-content textarea {
    background: white;
    border-color: #28a745;
    font-family: monospace;
    word-break: break-all;
}

.warning {
    margin-top: 10px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

.error-message {
    margin-top: 20px;
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 10px;
    font-size: 14px;
}

.info-box {
    background: #e7f3ff;
    padding: 20px;
    border-top: 1px solid #b8daff;
}

.info-box h3 {
    color: #004085;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-box ol {
    margin-left: 20px;
    color: #004085;
    line-height: 1.8;
}

.info-box li {
    margin-bottom: 5px;
    font-size: 14px;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
    }
    
    .header {
        padding: 20px;
    }
    
    .main-content {
        padding: 20px;
    }
}