:root {
    --primary-color: #3a86ff;
    --secondary-color: #8338ec;
    --accent-color: #ff006e;
    --background-dark: #0a0e17;
    --background-light: #1a1f2e;
    --text-color: #ffffff;
    --text-secondary: #b8c1ec;
    --card-background: rgba(26, 31, 46, 0.8);
    --card-hover: rgba(40, 48, 70, 0.9);
    --card-border: rgba(58, 134, 255, 0.2);
    --modal-background: rgba(26, 31, 46, 0.95);
    --success-color: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

body, html {
    height: 100%;
    background-color: var(--background-dark);
    color: var(--text-color);
    overflow-x: hidden;
}

#app {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    background-color: rgba(10, 14, 23, 0.8);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

nav button {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

nav button.active, nav button:hover {
    color: var(--text-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.external-links {
    display: flex;
    gap: 0.75rem;
    margin-left: 1rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-color);
}

/* Main Content */
main {
    flex: 1;
    padding: 2rem;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

/* Search */
.search-container {
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

#search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 2rem;
    border: 1px solid var(--card-border);
    background-color: var(--background-light);
    color: var(--text-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(58, 134, 255, 0.3);
}

/* Personas Container */
.personas-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.persona-card {
    background-color: var(--card-background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.persona-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    background-color: var(--card-hover);
    border-color: var(--primary-color);
}

.persona-image {
    height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.persona-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(10, 14, 23, 0.8), transparent);
}

.persona-content {
    padding: 1.5rem;
}

.persona-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.persona-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.persona-prompt-preview {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 0.5rem;
    max-height: 80px;
    overflow: hidden;
    position: relative;
}

.persona-prompt-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, rgba(26, 31, 46, 1), transparent);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: var(--modal-background);
    border-radius: 1rem;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--card-border);
}

.close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.close-button:hover {
    color: var(--accent-color);
}

.modal-header {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}

.persona-image-large {
    width: 200px;
    height: 200px;
    border-radius: 1rem;
    background-size: cover;
    background-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.persona-info {
    flex: 1;
}

.persona-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.persona-info p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

.prompt-container {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1.5rem;
}

.prompt-container h3 {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.prompt-text-container {
    position: relative;
}

#prompt-text {
    font-family: monospace;
    white-space: pre-wrap;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    max-height: 350px;
    overflow-y: auto;
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.5;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-button:hover {
    background-color: var(--secondary-color);
}

.copy-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: var(--success-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* About View */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 1rem;
    border: 1px solid var(--card-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.about-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .personas-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .modal-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .persona-image-large {
        width: 100%;
        height: 250px;
    }
    
    header {
        padding: 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    main {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .personas-container {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 1rem;
    }
    
    .persona-image-large {
        height: 200px;
    }
}