/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.5;
    color: #000;
    background: #fff;
    min-height: 100vh;
}

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

/* Header styles */
header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #000;
}

header p {
    font-size: 0.875rem;
    color: #666;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Converter section */
.converter {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    background: #fff;
}

.input-section, .output-section {
    margin-bottom: 16px;
}

.label-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

label {
    font-weight: 500;
    color: #000;
    font-size: 0.875rem;
}

.copy-button {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.copy-button:hover {
    border-color: #000;
    background: #fafafa;
}

.copy-icon {
    transition: all 0.2s ease;
    color: #666;
}

.copy-button:hover .copy-icon {
    color: #000;
}

.copy-button.success .copy-icon {
    color: #22c55e;
}

textarea {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    resize: vertical;
    min-height: 120px;
    background: #fff;
    transition: border-color 0.2s ease;
}

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

textarea[readonly] {
    background: #fafafa;
    color: #666;
}

/* Controls section */
.controls {
    display: flex;
    justify-content: center;
    margin: 16px 0;
}

#swap-button {
    background: #000;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#swap-button:hover {
    background: #333;
}

.swap-icon {
    font-size: 16px;
}

/* Examples section */
.examples {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 24px;
    background: #fff;
}

.examples h3 {
    margin-bottom: 16px;
    color: #000;
    font-size: 1rem;
    font-weight: 600;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.example-item {
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    font-size: 0.875rem;
}

.example-item code {
    color: #000;
    font-weight: 500;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
}

.example-item span {
    margin-left: 8px;
    color: #666;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    color: #666;
    font-size: 0.875rem;
}

/* Responsive design */
@media (max-width: 640px) {
    .container {
        padding: 20px 16px;
    }
    
    header h1 {
        font-size: 1.25rem;
    }
    
    .converter {
        padding: 16px;
    }
    
    .example-grid {
        grid-template-columns: 1fr;
    }
}