* {
    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, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 16px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 32px;
}

header h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.header-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.home-button,
.logout-button {
    display: inline-block;
    color: #5a67d8;
    text-decoration: none;
    padding: 10px 20px;
    background: white;
    border: 2px solid #5a67d8;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.logout-button {
    color: #e53e3e;
    border-color: #e53e3e;
}

.home-button:hover {
    background: #5a67d8;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(90, 103, 216, 0.3);
}

.logout-button:hover {
    background: #e53e3e;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(229, 62, 62, 0.3);
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* NSFW Filter Toggle */
.header-title-section {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nsfw-filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    user-select: none;
}

.nsfw-filter-toggle input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.nsfw-filter-toggle:hover {
    color: #2d3748;
}

/* NSFW Badge */
.nsfw-badge {
    display: inline-block;
    background: #e53e3e;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}

/* Checkbox label styling */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.checkbox-label span {
    color: #2d3748;
    font-weight: 500;
}

/* Setup Screen */
.setup-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.setup-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
}

.setup-card h2 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 1.8rem;
}

.setup-card p {
    color: #4a5568;
    margin-bottom: 16px;
    line-height: 1.6;
}

.hint {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #718096;
    border-left: 4px solid #5a67d8;
}

.category-setup {
    margin: 32px 0;
}

.category-setup h3 {
    color: #2c3e50;
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.input-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.input-group input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.input-group input:focus {
    outline: none;
    border-color: #5a67d8;
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e6f2ff;
    color: #2c3e50;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.category-chip button {
    background: none;
    border: none;
    color: #e53e3e;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.category-chip button:hover {
    background: rgba(229, 62, 62, 0.1);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-small,
.btn-back,
.btn-interview {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #5a67d8;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #4c51bf;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.4);
}

.btn-secondary {
    background: #718096;
    color: white;
}

.btn-secondary:hover {
    background: #4a5568;
    transform: translateY(-1px);
}

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

.btn-interview:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a4190 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: #48bb78;
    color: white;
    width: 100%;
    margin-top: 16px;
}

.btn-success:hover:not(:disabled) {
    background: #38a169;
    transform: translateY(-1px);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
    transform: translateY(-1px);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-back {
    background: #e2e8f0;
    color: #2c3e50;
    padding: 8px 16px;
}

.btn-back:hover {
    background: #cbd5e0;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Main Screen Layout */
.main-screen {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 24px;
    min-height: 70vh;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 16px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.sidebar-header h3 {
    color: #2c3e50;
    font-size: 1.1rem;
}

.category-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-btn {
    background: transparent;
    border: none;
    padding: 12px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4a5568;
    font-size: 0.95rem;
}

.category-btn:hover {
    background: #f7fafc;
}

.category-btn.active {
    background: #e6f2ff;
    color: #5a67d8;
    font-weight: 600;
}

.category-btn-collapsible {
    font-weight: 600;
}

.category-btn-subcategory {
    padding-left: 32px;
    font-size: 0.9rem;
    color: #718096;
}

/* Main Content */
.main-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.view-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.view-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

/* Stories Grid */
.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.story-card {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.story-card:hover {
    border-color: #5a67d8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(90, 103, 216, 0.2);
}

.story-card-header {
    margin-bottom: 12px;
}

.story-card-title {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.story-card-meta {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 8px;
}

.story-card-category {
    background: #e6f2ff;
    color: #5a67d8;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.story-card-preview {
    color: #4a5568;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-tags {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: #edf2f7;
    color: #4a5568;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
    grid-column: 1 / -1;
}

/* Story Detail */
.story-detail {
    max-width: 800px;
    margin: 0 auto;
}

.story-detail h2 {
    color: #2c3e50;
    font-size: 2rem;
    margin-bottom: 16px;
}

.story-detail-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.9rem;
    color: #718096;
}

.story-detail-content {
    color: #2c3e50;
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 16px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.close-btn:hover {
    background: #f7fafc;
    color: #2c3e50;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5a67d8;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    color: #718096;
    font-size: 0.85rem;
    margin-top: 6px;
}

.info-text {
    background: #f7fafc;
    padding: 12px;
    border-radius: 8px;
    color: #4a5568;
    margin-bottom: 20px;
    border-left: 4px solid #5a67d8;
}

/* Claude Response */
.claude-response {
    margin-top: 20px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
}

.claude-response h4 {
    color: #2c3e50;
    margin-bottom: 12px;
}

#claude-prompts {
    color: #2c3e50;
    line-height: 1.6;
}

/* Category Manager */
.manage-category-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.manage-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
}

.manage-category-item span {
    color: #2c3e50;
    font-weight: 500;
}

.manage-category-item button {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.manage-category-item button:hover {
    background: #c53030;
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .main-screen {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    body {
        padding: 12px;
    }

    header h1 {
        font-size: 2rem;
    }

    .setup-card {
        padding: 24px;
    }

    .main-content {
        padding: 20px;
    }

    .view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .action-buttons {
        width: 100%;
        flex-direction: column;
    }

    .action-buttons button {
        width: 100%;
    }
}

/* Interview Mode */
.interview-modal {
    max-width: 900px;
    max-height: 95vh;
}

.interview-error {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid #fecaca;
}

.interview-error.hidden {
    display: none;
}

/* Voice Settings */
.voice-settings {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.voice-mode-selector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.radio-option input[type="radio"] {
    margin-top: 3px;
}

.radio-option input[type="radio"]:checked + .radio-label strong {
    color: #667eea;
}

.radio-option:has(input:checked) {
    border-color: #667eea;
    background: #f0f4ff;
}

.radio-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.radio-label strong {
    font-size: 14px;
    color: #1a202c;
}

.radio-label small {
    font-size: 12px;
    color: #64748b;
}

.cartesia-settings {
    margin-top: 12px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #86efac;
}

.cartesia-settings.hidden {
    display: none;
}

.cartesia-settings select {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.cartesia-settings small {
    font-size: 12px;
    color: #92400e;
}

.cartesia-settings a {
    color: #d97706;
    text-decoration: underline;
}

.interview-conversation {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 24px;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.conversation-message {
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-claude {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 12px 12px 12px 4px;
    max-width: 85%;
}

.message-user {
    background: #5a67d8;
    color: white;
    padding: 12px 16px;
    border-radius: 12px 12px 4px 12px;
    margin-left: auto;
    max-width: 85%;
}

.message-label {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 600;
}

.message-text {
    line-height: 1.5;
}

.interview-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mic-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.mic-button {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.mic-button.listening {
    background: #e53e3e;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(229, 62, 62, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 6px 20px rgba(229, 62, 62, 0.5);
    }
}

.mic-icon {
    display: block;
}

.mic-status {
    font-size: 0.9rem;
    color: #4a5568;
    font-weight: 500;
}

.mic-status.listening {
    color: #e53e3e;
    font-weight: 600;
}

.transcript-box {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.transcript-label {
    font-size: 0.85rem;
    color: #718096;
    margin-bottom: 8px;
    font-weight: 600;
}

.live-transcript {
    color: #2c3e50;
    min-height: 60px;
    line-height: 1.6;
    font-size: 1.05rem;
}

.live-transcript.empty {
    color: #a0aec0;
    font-style: italic;
}

.interview-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f7fafc;
    border-radius: 8px;
    color: #718096;
    font-style: italic;
    margin-bottom: 16px;
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.thinking-dots span {
    width: 8px;
    height: 8px;
    background: #718096;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

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

@media (max-width: 768px) {
    .interview-modal {
        max-width: 100%;
    }

    .mic-button {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }

    .interview-actions {
        flex-direction: column;
    }

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

/* API Usage Banner */
.api-usage-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 12px 20px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: white;
    font-size: 0.9rem;
}

.api-usage-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.api-usage-info strong {
    font-weight: 600;
}

.api-usage-banner .btn-small {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.api-usage-banner .btn-small:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .api-usage-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .api-usage-info {
        justify-content: center;
    }
}

/* Enhanced API Usage Display */
#api-usage-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

#api-usage-display .usage-section {
    font-size: 0.95rem;
    margin-bottom: 4px;
}

#api-usage-display .usage-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
    opacity: 0.95;
}

#api-usage-display .usage-item {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

#api-usage-display .usage-total {
    background: rgba(255, 255, 255, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    #api-usage-display .usage-details {
        justify-content: center;
        font-size: 0.8rem;
    }

    #api-usage-display .usage-item,
    #api-usage-display .usage-total {
        padding: 3px 8px;
    }
}

/* General Info Section */
.general-info-content {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.general-info-content h2 {
    color: #2c3e50;
    margin-bottom: 12px;
}

.general-info-content .info-text {
    color: #718096;
    margin-bottom: 32px;
}

.general-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.general-info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border: 2px solid #8b5cf6;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.1);
}

.general-info-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.general-info-card ul {
    margin-top: 12px;
}

.general-info-card li {
    color: #2d3748;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sidebar-section {
    margin-top: 24px;
    padding-top: 24px;
}

@media (max-width: 768px) {
    .general-info-grid {
        grid-template-columns: 1fr;
    }

    .general-info-content {
        padding: 20px;
    }
}

/* Info Tabs */
.info-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-bottom: 2px solid #e2e8f0;
    background: white;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.info-tab {
    padding: 14px 28px;
    background: #f8fafc;
    border: none;
    border-bottom: 3px solid transparent;
    color: #64748b;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex: 1;
    text-align: center;
}

.info-tab:hover {
    color: #8b5cf6;
    background: #f3e8ff;
}

.info-tab.active {
    color: #8b5cf6;
    background: white;
    border-bottom-color: #8b5cf6;
}

.info-tab-content {
    animation: fadeIn 0.3s;
}

/* Family Tree */
.family-tree-container {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.family-tree-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

#family-tree-canvas {
    width: 100%;
    height: 600px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #fafafa;
    cursor: move;
}

#family-tree-canvas.selecting {
    cursor: crosshair;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Photos Grid for Family Tree Members */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.photo-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-item .photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: rgba(239, 68, 68, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.photo-item:hover .photo-delete {
    opacity: 1;
}

.photo-item .photo-delete:hover {
    background: #dc2626;
}

.photos-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 30px;
    color: #94a3b8;
    font-size: 14px;
}

.photos-empty-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

/* Photo Lightbox */
.photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.photo-lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.photo-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.photo-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-lightbox-nav:hover {
    background: rgba(255,255,255,0.3);
}

.photo-lightbox-nav.prev {
    left: 20px;
}

.photo-lightbox-nav.next {
    right: 20px;
}
