/* CSS Naming Convention Generator Styles */

/* CSS Variables */
:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: #e0e7ff;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --background-color: #f8fafc;
    --surface-color: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: 0.2s ease;
}

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #8b5cf6 100%);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-image {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.tagline {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Section */
.section {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
}

.section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

/* Convention Tabs */
.convention-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.convention-tab {
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
}

.convention-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.convention-tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.convention-description {
    padding: 0.75rem 1rem;
    background: var(--primary-light);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Input Grid */
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

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

.input-group label {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.375rem;
}

.label-text {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.label-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
}

.input-group input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--surface-color);
    transition: all var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.input-group input::placeholder {
    color: var(--text-muted);
}

/* Custom Separators */
.custom-separators {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.separator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.separator-grid input {
    font-family: 'Monaco', 'Consolas', monospace;
    text-align: center;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    border: none;
}

.btn-secondary {
    background: var(--surface-color);
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--background-color);
    border-color: var(--secondary-color);
    color: var(--text-primary);
}

.btn-secondary svg {
    opacity: 0.7;
}

/* Preview Section */
.preview-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preview-item {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    border: 1px solid var(--border-color);
}

.preview-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.preview-content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.preview-code {
    font-family: 'Monaco', 'Consolas', 'Liberation Mono', monospace;
    font-size: 1rem;
    color: var(--primary-color);
    background: var(--surface-color);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    flex: 1;
    word-break: break-all;
}

.preview-code-block {
    display: block;
    white-space: pre-wrap;
    font-size: 0.875rem;
    line-height: 1.5;
    max-height: 200px;
    overflow-y: auto;
}

.copy-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    color: var(--text-secondary);
}

.copy-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.copy-btn.copied {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

/* Reference Grid */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.reference-card {
    background: var(--background-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.reference-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    border-bottom: none;
    padding-bottom: 0;
}

.reference-card > p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.reference-card > code {
    display: block;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    color: var(--text-primary);
    background: var(--surface-color);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    word-break: break-all;
}

.reference-card ul {
    list-style: none;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.reference-card li {
    padding: 0.25rem 0;
    padding-left: 1rem;
    position: relative;
}

.reference-card li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: var(--text-muted);
    padding: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
}

.footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-primary);
    color: white;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        padding: 1.5rem 1rem;
    }

    .logo {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header h1 {
        font-size: 1.375rem;
    }

    .tagline {
        font-size: 0.875rem;
    }

    .main-content {
        padding: 1rem;
    }

    .section {
        padding: 1rem;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .separator-grid {
        grid-template-columns: 1fr;
    }

    .reference-grid {
        grid-template-columns: 1fr;
    }

    .convention-tabs {
        flex-direction: column;
    }

    .convention-tab {
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .preview-content {
        flex-direction: column;
        align-items: stretch;
    }

    .copy-btn {
        width: 100%;
        height: auto;
        padding: 0.625rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .logo-image {
        width: 40px;
        height: 40px;
    }
}

/* Dark mode support (optional, using system preference) */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-light: #312e81;
        --background-color: #0f172a;
        --surface-color: #1e293b;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --text-muted: #64748b;
        --border-color: #334155;
    }

    .header {
        background: linear-gradient(135deg, #4338ca 0%, #6d28d9 100%);
    }

    .convention-description {
        background: #312e81;
    }

    .copy-btn:hover {
        background: #312e81;
    }

    .footer {
        background: #020617;
    }

    .footer a {
        color: #a5b4fc;
    }
}

/* Print styles */
@media print {
    .action-buttons,
    .copy-btn,
    .toast {
        display: none;
    }

    .section {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
