/* CalcTechLab Random Name Picker Styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--brand-primary), var(--primary-300));
    border-radius: var(--radius-xl);
    color: white;
    box-shadow: var(--shadow-lg);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* Name Input Section */
.name-input-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.input-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.input-methods {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.input-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-base);
    color: var(--text-secondary);
    font-weight: 500;
}

.input-method:hover {
    color: var(--brand-primary);
    background: rgba(6, 182, 212, 0.05);
}

.input-method.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

.method-icon {
    font-size: 1.25rem;
}

.input-area {
    margin-bottom: 1.5rem;
}

.input-area.hidden {
    display: none;
}

.name-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    min-height: 50px;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
}

.name-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--primary-300));
    color: white;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    animation: tagAppear var(--transition-base);
}

@keyframes tagAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.name-tag .remove-tag {
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.name-tag .remove-tag:hover {
    opacity: 1;
}

.name-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.name-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.separator {
    color: var(--border-color);
}

#pasteArea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: all var(--transition-base);
}

#pasteArea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.quick-add {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-add-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.quick-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.quick-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-back,
.btn-icon {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--primary-300));
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-back {
    background: transparent;
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
}

.btn-back:hover {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    font-size: 1.25rem;
}

.btn-icon:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* Picker Modes Section */
.picker-modes-section {
    margin-bottom: 3rem;
}

.picker-modes-section > h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.mode-category {
    margin-bottom: 3rem;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    padding-left: 1rem;
    border-left: 4px solid var(--brand-primary);
}

.picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.picker-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 2px solid transparent;
}

.picker-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--brand-primary);
}

.picker-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.picker-name {
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.picker-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-select:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Picker Canvas Section */
.picker-canvas-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.picker-canvas-section.hidden {
    display: none;
}

.canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

#currentPickerTitle {
    font-size: 1.5rem;
    color: var(--text-primary);
    flex: 1;
    text-align: center;
}

.canvas-controls {
    display: flex;
    gap: 0.5rem;
}

.canvas-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto 2rem;
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

#mainCanvas {
    width: 100%;
    height: 500px;
    display: block;
}

.result-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayAppear var(--transition-base);
}

.result-overlay.hidden {
    display: none;
}

@keyframes overlayAppear {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.result-content {
    text-align: center;
    color: white;
    padding: 2rem;
    animation: resultPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes resultPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: iconSpin 0.6s ease;
}

@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.result-label {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.result-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.picker-controls {
    text-align: center;
}

/* History Section */
.history-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.history-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-input);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--brand-primary);
}

.history-mode {
    font-weight: 600;
    color: var(--brand-primary);
    min-width: 150px;
}

.history-name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
}

.history-time {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.no-history {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
}

/* SEO Content */
.seo-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
    line-height: 1.8;
}

.seo-content h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.seo-content h3 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.seo-content h4 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.seo-content p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
}

.seo-content ul {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.seo-content li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.seo-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

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

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

    .subtitle {
        font-size: 1rem;
    }

    .name-input-section,
    .picker-canvas-section,
    .history-section,
    .seo-content {
        padding: 1.5rem;
    }

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

    .canvas-header {
        flex-direction: column;
        align-items: stretch;
    }

    #currentPickerTitle {
        text-align: center;
    }

    .canvas-controls {
        justify-content: center;
    }

    #mainCanvas {
        height: 400px;
    }

    .result-name {
        font-size: 2rem;
    }

    .history-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .history-mode {
        min-width: auto;
    }

    .seo-content {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.75rem;
    }

    .input-methods {
        flex-direction: column;
        gap: 0;
    }

    .input-method {
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }

    .input-method.active {
        border-bottom-color: var(--border-color);
        border-left-color: var(--brand-primary);
    }

    .quick-add {
        flex-direction: column;
        align-items: stretch;
    }

    .quick-btn {
        width: 100%;
    }

    #mainCanvas {
        height: 300px;
    }

    .result-actions {
        flex-direction: column;
        width: 100%;
    }

    .result-actions button {
        width: 100%;
    }
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Loading State */
.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Disabled State */
.disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}