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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', sans-serif;
    background: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
    padding-bottom: 140px; /* Space for sticky input */
}

.container {
    max-width: 900px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: #111111;
    border-bottom: 1px solid #222222;
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.logo i {
    color: #888888;
    font-size: 2rem;
    filter: drop-shadow(0 0 8px rgba(136, 136, 136, 0.3));
}

.subtitle {
    font-size: 0.95rem;
    color: #999999;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 3rem 2rem 2rem;
    display: flex;
    flex-direction: column;
}

.chat-container {
    flex: 1;
    max-width: 100%;
}

/* Instructions */
.instructions {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #151515 100%);
    border: 1px solid #222222;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.instructions h4 {
    color: #cccccc;
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instructions h4 i {
    color: #888888;
}

.instructions ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.instructions li {
    padding: 0.5rem 0;
    color: #e0e0e0;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.instructions li::before {
    content: "•";
    color: #888888;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
}

.example-box {
    background: #000000;
    border: 1px solid #333333;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.example-box p {
    color: #cccccc;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-box i {
    color: #888888;
}

.example-box pre {
    color: #aaaaaa;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
}

/* Messages */
.message-wrapper {
    margin-bottom: 3rem;
}

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

.assistant-message {
    margin-right: 3rem;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid #444444;
}

.message-content {
    flex: 1;
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid #222222;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.message-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #333333, transparent);
}

.message-content p {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.7;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* Results Container */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Individual Result Set */
.result-set {
    animation: fadeInUp 0.4s ease-out;
    margin-bottom: 2rem;
}

.result-set .message-wrapper {
    margin-bottom: 2rem;
}

.result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    border: 1px solid #222222;
    border-radius: 8px;
}

.result-header h3 {
    color: #cccccc;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-header .timestamp {
    color: #777777;
    font-size: 0.8rem;
}

.url-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* URL Groups */
.url-group {
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    border: 1px solid #222222;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    animation: slideInRight 0.3s ease-out;
}

.url-group:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: #333333;
}

.url-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    border-bottom: 1px solid #222222;
}

.url-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #cccccc;
    letter-spacing: 0.02em;
}

.url-label i {
    font-size: 1.125rem;
    color: #888888;
}

.copy-all-btn {
    background: linear-gradient(135deg, #333333 0%, #444444 100%);
    border: 1px solid #555555;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.copy-all-btn:hover {
    background: linear-gradient(135deg, #444444 0%, #555555 100%);
    border-color: #666666;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.copy-all-btn:active {
    transform: scale(0.95);
}

.copy-all-btn.copied {
    background: linear-gradient(135deg, #555555 0%, #777777 100%);
    border-color: #666666;
}

.copy-all-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.copy-all-btn:hover::before {
    left: 100%;
}

.url-list {
    padding: 1.25rem;
    max-height: 200px;
    overflow-y: auto;
}

.url-list .url-item {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: #000000;
    border: 1px solid #333333;
    border-radius: 6px;
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.8rem;
    color: #aaaaaa;
    word-break: break-all;
    line-height: 1.4;
}

.url-list .url-item:last-child {
    margin-bottom: 0;
}

/* Sticky Input Section */
.sticky-input-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem 2rem;
    z-index: 90;
    backdrop-filter: blur(10px);
}

.sticky-input-section .input-container {
    max-width: 900px;
    margin: 0 auto;
    background: linear-gradient(135deg, #111111 0%, #1a1a1a 100%);
    border: 1px solid #333333;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.sticky-input-section .input-container:focus-within {
    border-color: #666666;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 0 3px rgba(102, 102, 102, 0.1);
    transform: translateY(-2px);
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

#urlInput {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.05rem;
    resize: none;
    max-height: 120px;
    min-height: 48px;
    font-family: inherit;
    line-height: 1.6;
}

#urlInput::placeholder {
    color: #777777;
}

.input-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.url-counter {
    font-size: 0.8rem;
    color: #888888;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
}

.generate-btn {
    background: linear-gradient(135deg, #555555 0%, #777777 100%);
    border: none;
    border-radius: 12px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border: 1px solid #666666;
    position: relative;
    overflow: hidden;
}

.generate-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #666666 0%, #888888 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

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

.generate-btn:disabled {
    background: linear-gradient(135deg, #222222 0%, #333333 100%);
    cursor: not-allowed;
    transform: none;
    border-color: #333333;
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.generate-btn:hover:not(:disabled)::before {
    left: 100%;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 8rem;
    right: 2rem;
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    color: white;
    padding: 1.25rem 1.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    border: 1px solid #444444;
    backdrop-filter: blur(10px);
}

.toast.show {
    transform: translateX(0);
}

.toast i {
    font-size: 1.25rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 2px solid #333333;
    border-radius: 50%;
    border-top-color: #888888;
    animation: spin 1s ease-in-out infinite;
}

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

/* Custom scrollbar for URL lists */
.url-list::-webkit-scrollbar {
    width: 4px;
}

.url-list::-webkit-scrollbar-track {
    background: #111111;
}

.url-list::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 2px;
}

.url-list::-webkit-scrollbar-thumb:hover {
    background: #555555;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-bottom: 160px;
    }
    
    .header {
        padding: 1.25rem;
    }
    
    .main-content {
        padding: 2rem 1.25rem;
    }
    
    .assistant-message {
        margin-right: 0;
    }
    
    .sticky-input-section {
        padding: 1rem 1.25rem 1.5rem;
    }
    
    .toast {
        right: 1rem;
        bottom: 9rem;
        left: 1rem;
        transform: translateY(100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .logo i {
        font-size: 1.75rem;
    }
    
    .input-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    
    .input-controls {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
    
    .url-group-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .copy-all-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .url-list {
        max-height: 150px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #111111;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #333333 0%, #555555 100%);
    border-radius: 4px;
    border: 1px solid #222222;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #444444 0%, #666666 100%);
}

/* Focus states for accessibility */
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #666666;
    outline-offset: 2px;
} 