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

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

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

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 600;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.nav a:hover,
.nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

.main {
    padding: 40px 0;
    flex: 1;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.section-desc {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.tool-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.tool-icon {
    width: 50px;
    height: 50px;
    color: #667eea;
    margin-bottom: 20px;
}

.tool-icon svg {
    width: 100%;
    height: 100%;
}

.tool-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.tool-card p {
    color: #7f8c8d;
    font-size: 14px;
}

.footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

.tool-page-header {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.tool-page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tool-page-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tool-page-title svg {
    width: 28px;
    height: 28px;
    color: #667eea;
}

.tool-page-title h1 {
    font-size: 20px;
    color: #2c3e50;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: background-color 0.3s;
}

.back-link:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.tool-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.tool-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: #f5f7fa;
    color: #333;
}

.btn-secondary:hover {
    background-color: #e8eaed;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

.form-control.error {
    border-color: #e74c3c;
}

textarea.form-control {
    min-height: 200px;
}

.result-container {
    margin-top: 20px;
}

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

.result-header h3 {
    font-size: 16px;
    color: #2c3e50;
}

.result-stats {
    font-size: 12px;
    color: #7f8c8d;
}

.result-content {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.result-content pre {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #2c3e50;
}

.error-message {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 10px;
}

.success-message {
    color: #27ae60;
    font-size: 13px;
    margin-top: 10px;
}

.language-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.language-option {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.language-option.active {
    background-color: #667eea;
    color: #fff;
    border-color: #667eea;
}

.class-name-input {
    max-width: 300px;
}

@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}