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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0a0a0f;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Discord Color Variables */
:root {
    --discord-blurple: #5865f2;
    --discord-dark: #36393f;
    --discord-darker: #2f3136;
    --discord-light: #b9bbbe;
    --discord-green: #57f287;
    --discord-yellow: #fee75c;
    --bg-primary: #0a0a0f;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #16213e;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Navigation */
.navbar {
    background-color: var(--discord-darker);
    border-bottom: 1px solid #404040;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bot-icon {
    font-size: 1.5rem;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--discord-light);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: white;
}

.btn-primary {
    background-color: var(--discord-blurple);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #4f46e5;
}

/* Hero Section */
.hero {
    padding: 5rem 1rem;
    text-align: center;
}

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

.hero-visual {
    margin-bottom: 2rem;
}

.hero-icon {
    width: 16rem;
    height: 16rem;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.2), rgba(147, 51, 234, 0.2));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--discord-blurple), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--discord-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-hero {
    background: linear-gradient(135deg, var(--discord-blurple), #9333ea);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(88, 101, 242, 0.3);
}

/* Features Section */
.features {
    padding: 4rem 1rem;
    background-color: var(--discord-darker);
}

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

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.features-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.features-header p {
    font-size: 1.125rem;
    color: var(--discord-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--discord-dark);
    border: 1px solid #404040;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s;
}

.feature-card:hover {
    border-color: var(--discord-blurple);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p {
    color: var(--discord-light);
}

/* Generator Section */
.generator {
    padding: 4rem 1rem;
}

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

.generator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.generator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.generator-header p {
    font-size: 1.125rem;
    color: var(--discord-light);
}

.start-section {
    text-align: center;
}

.btn-large {
    background-color: var(--discord-blurple);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-large:hover {
    background-color: #4f46e5;
}

/* Chat Interface */
.chat-interface {
    margin-top: 2rem;
}

.chat-container {
    background-color: var(--discord-darker);
    border: 1px solid #404040;
    border-radius: 0.5rem;
    overflow: hidden;
}

.chat-header {
    background-color: var(--discord-dark);
    border-bottom: 1px solid #404040;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.traffic-lights {
    display: flex;
    gap: 0.5rem;
}

.light {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
}

.light.red { background-color: #ff5f56; }
.light.yellow { background-color: var(--discord-yellow); }
.light.green { background-color: var(--discord-green); }

.chat-title {
    flex-grow: 1;
    color: var(--discord-light);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--discord-green);
    font-size: 0.875rem;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    background-color: var(--discord-green);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

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

.chat-messages {
    height: 24rem;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.message-avatar.bot {
    background-color: var(--discord-blurple);
}

.message-avatar.user {
    background-color: #9333ea;
}

.message-content {
    max-width: 24rem;
    padding: 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.message.bot .message-content {
    background-color: #404040;
    border-top-left-radius: 0.25rem;
}

.message.user .message-content {
    background-color: var(--discord-blurple);
    border-top-right-radius: 0.25rem;
}

.chat-input {
    border-top: 1px solid #404040;
    padding: 1rem;
    display: flex;
    gap: 0.75rem;
}

.chat-input input {
    flex-grow: 1;
    background-color: var(--discord-dark);
    border: 1px solid #404040;
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: white;
    font-size: 0.875rem;
}

.chat-input input:focus {
    outline: none;
    border-color: var(--discord-blurple);
}

.chat-input input::placeholder {
    color: var(--discord-light);
}

.chat-input button {
    background-color: var(--discord-blurple);
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-input button:hover:not(:disabled) {
    background-color: #4f46e5;
}

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

/* Progress */
.progress-container {
    margin-top: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--discord-light);
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background-color: #404040;
    border-radius: 0.25rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--discord-blurple);
    transition: width 0.3s;
    width: 0%;
}

/* Results Section */
.results {
    padding: 4rem 1rem;
    background-color: var(--discord-darker);
}

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

.results-header {
    text-align: center;
    margin-bottom: 2rem;
}

.results-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.results-header p {
    font-size: 1.125rem;
    color: var(--discord-light);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.template-card {
    background-color: var(--discord-dark);
    border: 1px solid #404040;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: border-color 0.3s, transform 0.3s;
}

.template-card:hover {
    border-color: var(--discord-blurple);
    transform: translateY(-2px);
}

.template-header {
    background-color: var(--bg-tertiary);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.template-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.template-icon {
    font-size: 1.5rem;
}

.template-name {
    font-weight: 600;
    color: white;
}

.char-count {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-weight: 500;
}

.char-count.good {
    background-color: rgba(87, 242, 135, 0.2);
    color: var(--discord-green);
}

.char-count.warning {
    background-color: rgba(254, 231, 92, 0.2);
    color: var(--discord-yellow);
}

.char-count.danger {
    background-color: rgba(237, 66, 69, 0.2);
    color: #ed4245;
}

.template-content {
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.template-preview {
    background-color: #2b2d31;
    border: 1px solid #3f4147;
    border-radius: 0.375rem;
    padding: 0.75rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #dbdee1;
}

.template-actions {
    padding: 1rem;
    border-top: 1px solid #404040;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .template-actions {
        padding: 0.75rem;
        gap: 0.25rem;
    }
    
    .btn-copy {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
    }
    
    .btn-download-single {
        padding: 0.375rem;
    }
}

.btn-copy {
    flex: 1;
    background-color: var(--discord-blurple);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-copy:hover {
    background-color: #4f46e5;
}

.btn-copy.copied {
    background-color: var(--discord-green);
}

.btn-download-single {
    background-color: #404040;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-download-single:hover {
    background-color: #4f4f4f;
}

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

.btn-download {
    background-color: var(--discord-green);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-download:hover {
    background-color: #4cb04c;
}

.btn-secondary {
    background-color: #404040;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background-color: #4f4f4f;
}

/* Footer */
.footer {
    background-color: var(--discord-dark);
    border-top: 1px solid #404040;
    padding: 3rem 1rem 2rem;
    color: var(--discord-light);
}

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

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo span:last-child {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-section h4 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--discord-light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #404040;
    font-size: 0.875rem;
}

/* Error States */
.error-message {
    background-color: rgba(237, 66, 69, 0.1);
    border: 1px solid #ed4245;
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1rem 0;
    color: #ed4245;
    text-align: center;
}

.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--discord-light);
}

.loading-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid #404040;
    border-top: 2px solid var(--discord-blurple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-icon {
        width: 12rem;
        height: 12rem;
        font-size: 3rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-links a {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .results-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Enter key animation */
@keyframes enterPress {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(0.95); }
}

.chat-input input:focus {
    animation: none;
}

/* Custom scrollbar */
.chat-messages::-webkit-scrollbar,
.template-content::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track,
.template-content::-webkit-scrollbar-track {
    background-color: #2b2d31;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb,
.template-content::-webkit-scrollbar-thumb {
    background-color: #404040;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover,
.template-content::-webkit-scrollbar-thumb:hover {
    background-color: #4f4f4f;
}
