/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
}

html, body {
    height: auto;
    overflow-x: hidden;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-delay-1 {
    transition-delay: 0.1s;
}

.scroll-animate-delay-2 {
    transition-delay: 0.2s;
}

.scroll-animate-delay-3 {
    transition-delay: 0.3s;
}

.scroll-animate-delay-4 {
    transition-delay: 0.4s;
}

/* Sophisticated Event Animations */
.hero-entrance {
    animation: heroEntrance 1.2s ease-out forwards;
}

@keyframes heroEntrance {
    0% {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.logo-float {
    animation: logoFloat 3s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.text-reveal {
    animation: textReveal 0.8s ease-out forwards;
}

@keyframes textReveal {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.card-hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.icon-pulse {
    animation: iconPulse 2s ease-in-out infinite;
}

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

.glow-effect {
    position: relative;
    overflow: hidden;
}

.glow-effect::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.glow-effect:hover::before {
    animation: shimmer 0.8s ease-in-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
        opacity: 0;
    }
}

.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s infinite linear;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Podcast Section Styles */
.podcast-section {
    margin: 60px 0;
    padding: 40px 0;
    text-align: center;
}

.podcast-section h2 {
    font-size: 36px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #007AFF, #34C759, #FF9500);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.podcast-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.podcast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin: 40px 0;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.podcast-card {
    background: rgba(44, 44, 46, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    text-align: left;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.podcast-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007AFF, #34C759, #FF9500);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.podcast-card:hover {
    background: rgba(44, 44, 46, 0.6);
    border-color: rgba(0, 122, 255, 0.3);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.2);
}

.podcast-card:hover::before {
    opacity: 1;
}

.podcast-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.podcast-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #007AFF, #34C759);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    animation: iconPulse 2s ease-in-out infinite;
}

.podcast-icon i {
    font-size: 24px;
    color: white;
}

.podcast-info h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.podcast-info p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
}

.podcast-player {
    margin: 20px 0;
}

.podcast-player audio {
    width: 100%;
    height: 50px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
    outline: none;
}

.podcast-player audio::-webkit-media-controls-panel {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 25px;
}

.podcast-player audio::-webkit-media-controls-play-button {
    background-color: #007AFF;
    border-radius: 50%;
}

.podcast-duration {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.duration-badge {
    background: rgba(0, 122, 255, 0.2);
    color: #007AFF;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.play-button {
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.play-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.5);
}

.play-button i {
    font-size: 18px;
    margin-left: 2px;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #151517;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

/* Top Bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #151517;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tab Navigation */
.tab-navigation {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: #151517;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 999;
    padding: 12px 20px;
    height: 60px;
}

.tab-container {
    display: flex;
    gap: 8px;
    max-width: 1200px;
    margin: 0 auto;
}

.tab-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 12px 20px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    border-bottom: 2px solid transparent;
}

.tab-button:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.tab-button.active {
    color: #007AFF;
    background: rgba(0, 122, 255, 0.1);
    border-bottom-color: #007AFF;
}

.tab-button i {
    font-size: 18px;
}

.tab-button span {
    font-size: 14px;
}

.menu-button, .add-button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.menu-button:hover, .add-button:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    padding-top: 140px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 120px;
    min-height: 100vh;
}

/* Adjust padding when input bar is hidden */
body.homepage-active .main-content {
    padding-bottom: 20px;
}

/* Tab Content */
.tab-content {
    display: none;
    width: 100%;
}

.tab-content.active {
    display: block;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-icon {
    margin-bottom: 24px;
    position: relative;
}

.alpar-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 122, 255, 0.3));
    transition: all 0.3s ease;
}

.alpar-logo:hover {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(0, 122, 255, 0.5));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-5px) rotate(0deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-15px) rotate(-2deg);
        opacity: 0.9;
    }
}

@keyframes logoThink {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(0, 122, 255, 0.3));
    }
    25% {
        transform: scale(1.1) rotate(5deg);
        filter: drop-shadow(0 0 25px rgba(0, 122, 255, 0.6));
    }
    50% {
        transform: scale(1.05) rotate(-5deg);
        filter: drop-shadow(0 0 30px rgba(0, 122, 255, 0.8));
    }
    75% {
        transform: scale(1.1) rotate(3deg);
        filter: drop-shadow(0 0 25px rgba(0, 122, 255, 0.6));
    }
}

@keyframes logoType {
    0% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(0, 122, 255, 0.3));
    }
    50% {
        transform: scale(1.05) rotate(2deg);
        filter: drop-shadow(0 0 25px rgba(0, 122, 255, 0.5));
    }
    100% {
        transform: scale(1) rotate(0deg);
        filter: drop-shadow(0 0 20px rgba(0, 122, 255, 0.3));
    }
}

.welcome-text {
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

/* Chat Messages */
.chat-messages {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
    flex: 1;
    overflow-y: auto;
}

.message {
    display: flex;
    margin-bottom: 32px;
    animation: slideIn 0.4s ease-out;
    position: relative;
}

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

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

.assistant-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 75%;
    position: relative;
    word-wrap: break-word;
}

/* User Message Styling */
.user-message .message-content {
    background: #2c2c2e;
    color: white;
    padding: 12px 16px;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(44, 44, 46, 0.3);
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Assistant Message Styling - No bubble, just markdown content */
.assistant-message .message-content {
    background: transparent;
    color: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

/* Assistant content without bubble */
.assistant-content {
    background: transparent;
    color: #ffffff;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
    max-width: 100%;
    word-wrap: break-word;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Message Actions */
.message-actions {
    position: absolute;
    top: -8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message:hover .message-actions {
    opacity: 1;
}

.action-button {
    background: rgba(0, 0, 0, 0.8);
    border: none;
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.action-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.user-message .action-button {
    background: rgba(255, 255, 255, 0.2);
}

.user-message .action-button:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Collapsible Blocks */
.collapsible-block {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    margin: 12px 0;
    overflow: hidden;
    background: rgba(44, 44, 46, 0.3);
}

.collapsible-header {
    padding: 12px 16px;
    background: rgba(44, 44, 46, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.collapsible-header:hover {
    background: rgba(44, 44, 46, 0.7);
}

.collapsible-icon {
    font-size: 16px;
    color: #007AFF;
    transition: transform 0.3s ease;
}

.collapsible-block.expanded .collapsible-icon {
    transform: rotate(90deg);
}

.collapsible-title {
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
}

.collapsible-content {
    padding: 16px;
    display: none;
    background: rgba(44, 44, 46, 0.2);
}

.collapsible-block.expanded .collapsible-content {
    display: block;
    animation: expandContent 0.3s ease-out;
}

@keyframes expandContent {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Final Response */
.final-response {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(0, 122, 255, 0.05) 100%);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 12px;
    padding: 16px 20px;
    margin: 16px 0;
    position: relative;
}

.final-response::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #007AFF;
    border-radius: 0 2px 2px 0;
}

.final-response-text {
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    font-weight: 500;
}

/* Message Content Styling */
.message-content p {
    margin: 0 0 12px 0;
    line-height: 1.6;
}

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

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
    color: #8E8E93;
    font-style: italic;
}

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

.typing-dot {
    width: 6px;
    height: 6px;
    background: #007AFF;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Bottom Input Bar */
.bottom-input-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #151517;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px 20px;
    z-index: 1000;
    transition: all 0.3s ease;
}

/* Hide input bar on homepage */
body.homepage-active .bottom-input-bar {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.input-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #2c2c2e;
    border-radius: 24px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Input Left - Pill Buttons */
.input-left {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.pill-button {
    background: none;
    border: none;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.deepthink-button {
    background: #007AFF;
    color: white;
}

.deepthink-button:hover {
    background: #0056CC;
}

.search-button {
    background: #48484A;
    color: #ffffff;
}

.search-button:hover {
    background: #2c2c2e;
}

/* Input Center */
.input-center {
    flex: 1;
    min-width: 0;
}

.input-center input {
    width: 100%;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    padding: 12px 16px;
    outline: none;
    font-family: 'Victor Mono', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.input-center input::placeholder {
    color: rgba(255, 255, 255, 0.1);
}

/* Input Right */
.input-right {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.attach-button, .send-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.1);
    font-size: 18px;
    cursor: pointer;
    padding: 12px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.attach-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.send-button {
    background: #007AFF;
    color: white;
}

.send-button:hover {
    background: #0056CC;
}

.send-button:disabled {
    background: #48484A;
    cursor: not-allowed;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #151517;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    text-align: center;
    color: #007AFF;
}

.loading-logo {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    animation: spin 2s linear infinite;
    filter: drop-shadow(0 0 15px rgba(0, 122, 255, 0.5));
}

.loading-spinner p {
    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
}

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

/* Enhanced Markdown Styling */
.markdown-content {
    line-height: 1.7;
    font-size: 18px;
    color: #ffffff;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Headings */
.markdown-heading {
    margin: 24px 0 12px 0;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    position: relative;
}

.markdown-h1 {
    font-size: 32px;
    margin-top: 32px;
    margin-bottom: 16px;
    border-bottom: 2px solid rgba(0, 122, 255, 0.3);
    padding-bottom: 8px;
}

.markdown-h2 {
    font-size: 28px;
    margin-top: 28px;
    margin-bottom: 14px;
    color: #007AFF;
}

.markdown-h3 {
    font-size: 24px;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #ffffff;
}

.markdown-h4 {
    font-size: 22px;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #ffffff;
}

.markdown-h5 {
    font-size: 20px;
    margin-top: 16px;
    margin-bottom: 8px;
    color: #ffffff;
}

.markdown-h6 {
    font-size: 18px;
    margin-top: 14px;
    margin-bottom: 6px;
    color: #8E8E93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paragraphs */
.markdown-paragraph {
    margin: 12px 0;
    line-height: 1.7;
    color: #ffffff;
    font-size: 18px;
}

/* Lists */
.markdown-unordered-list,
.markdown-ordered-list {
    margin: 12px 0;
    padding-left: 24px;
}

.markdown-list-item {
    margin: 6px 0;
    line-height: 1.6;
    color: #ffffff;
    font-size: 18px;
}

.markdown-unordered-list .markdown-list-item {
    list-style-type: disc;
}

.markdown-ordered-list .markdown-list-item {
    list-style-type: decimal;
}

/* Blockquotes */
.markdown-blockquote {
    margin: 16px 0;
    padding: 16px 20px;
    border-left: 4px solid #007AFF;
    background: rgba(0, 122, 255, 0.08);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #ffffff;
    position: relative;
}

.markdown-blockquote::before {
    content: '"';
    font-size: 48px;
    color: #007AFF;
    position: absolute;
    top: -8px;
    left: 8px;
    opacity: 0.3;
    font-family: serif;
}

/* Code */
.markdown-inline-code {
    background: rgba(44, 44, 46, 0.8);
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 16px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-code-block {
    margin: 16px 0;
    padding: 20px;
    background: rgba(44, 44, 46, 0.6);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 16px;
    line-height: 1.5;
    position: relative;
}

.markdown-code-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #34C759, #FF9500);
    border-radius: 12px 12px 0 0;
}

.markdown-code-block code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    color: #ffffff;
}

/* Tables */
.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 16px;
    background: rgba(44, 44, 46, 0.3);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.markdown-table-header,
.markdown-table-cell {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.markdown-table-header {
    background: rgba(0, 122, 255, 0.2);
    font-weight: 600;
    color: #ffffff;
}

.markdown-table-cell {
    color: #ffffff;
}

.markdown-table-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Links */
.markdown-link {
    color: #007AFF;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.markdown-link:hover {
    border-bottom: 1px solid #007AFF;
    color: #0056CC;
}

/* Horizontal Rules */
.markdown-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 122, 255, 0.5), transparent);
    margin: 24px 0;
    border-radius: 1px;
}

/* Text Formatting */
.markdown-content strong {
    font-weight: 700;
    color: #ffffff;
}

.markdown-content em {
    font-style: italic;
    color: #ffffff;
}

.markdown-content del {
    text-decoration: line-through;
    opacity: 0.6;
    color: #8E8E93;
}

/* Special Elements */
.markdown-content mark {
    background: rgba(255, 235, 59, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    color: #ffffff;
}

/* User message specific overrides */
.user-message .markdown-content {
    color: #ffffff;
}

.user-message .markdown-inline-code {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.user-message .markdown-code-block {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-message .markdown-link {
    color: #ffffff;
}

.user-message .markdown-link:hover {
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
}

/* Chart styling */
.chart-container {
    position: relative;
    margin: 16px 0;
    padding: 16px;
    background: rgba(44, 44, 46, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-message .chart-container {
    background: rgba(44, 44, 46, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.chart-container canvas {
    max-width: 100%;
    height: auto !important;
}

.chart-title {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    text-align: center;
}

.user-message .chart-title {
    color: white;
}

.chart-description {
    color: #8E8E93;
    font-size: 14px;
    margin-top: 8px;
    text-align: center;
    font-style: italic;
}

.user-message .chart-description {
    color: rgba(255, 255, 255, 0.8);
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    color: #007AFF;
    font-style: italic;
}

.chart-loading i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

/* Code syntax highlighting */
.hljs {
    background: rgba(44, 44, 46, 0.5) !important;
    border-radius: 8px;
    padding: 16px !important;
    color: #ffffff !important;
}

.user-message .hljs {
    background: rgba(44, 44, 46, 0.7) !important;
    color: white !important;
}

/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .main-content {
        padding-top: 130px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: 120px;
    }
    
    body.homepage-active .main-content {
        padding-bottom: 16px;
    }
    
    .tab-navigation {
        padding: 0 16px;
    }
    
    .agent-features {
        gap: 24px;
    }
    
    .feature-item {
        min-width: 110px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .welcome-text {
        font-size: 28px;
    }
    
    .alpar-logo {
        width: 70px;
        height: 70px;
    }
    
    .input-container {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .input-left {
        order: 2;
        justify-content: center;
    }
    
    .input-center {
        order: 1;
        width: 100%;
    }
    
    .input-right {
        order: 3;
        justify-content: center;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .top-bar {
        padding: 0 16px;
    }
    
    .bottom-input-bar {
        padding: 12px 16px;
    }
    
    .tab-navigation {
        padding: 0 16px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .tab-button span {
        display: none;
    }
    
    .agent-features {
        gap: 16px;
    }
    
    .feature-item {
        min-width: 100px;
        padding: 12px;
    }
    
    .agent-title {
        font-size: 28px;
    }
    
    .agent-description {
        font-size: 16px;
    }
    
    .agent-instructions {
        padding: 20px;
    }
    
    .agent-instructions h3 {
        font-size: 18px;
    }
    
    .agent-instructions li {
        font-size: 15px;
    }
}

/* Mobile Phones */
@media (max-width: 480px) {
    .welcome-text {
        font-size: 22px;
        line-height: 1.3;
    }
    
    .alpar-logo {
        width: 60px;
        height: 60px;
    }
    
    .pill-button {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .message-content {
        max-width: 92%;
        padding: 12px 16px;
    }
    
    .input-container {
        padding: 10px;
        border-radius: 20px;
    }
    
    .attach-button, .send-button {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
    
    .input-center input {
        font-size: 16px;
        padding: 10px 14px;
    }
    
    .top-bar {
        height: 56px;
        padding: 0 12px;
    }
    
    .menu-button, .add-button {
        padding: 10px;
        font-size: 16px;
    }
    
    .tab-navigation {
        padding: 0 12px;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .main-content {
        padding-top: 120px;
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 120px;
    }
    
    body.homepage-active .main-content {
        padding-bottom: 12px;
    }
    
    .agent-section {
        padding: 20px 12px;
    }
    
    .agent-title {
        font-size: 24px;
    }
    
    .agent-description {
        font-size: 15px;
    }
    
    .agent-features {
        gap: 12px;
        flex-direction: column;
        align-items: center;
    }
    
    .feature-item {
        min-width: 200px;
        padding: 16px;
    }
    
    .agent-instructions {
        padding: 16px;
    }
    
    .agent-instructions h3 {
        font-size: 16px;
    }
    
    .agent-instructions li {
        font-size: 14px;
    }
    
    .agent-icon i {
        font-size: 60px;
    }
}

/* Very Small Mobile Phones */
@media (max-width: 360px) {
    .welcome-text {
        font-size: 20px;
    }
    
    .alpar-logo {
        width: 50px;
        height: 50px;
    }
    
    .pill-button {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .input-container {
        padding: 8px;
    }
    
    .attach-button, .send-button {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .input-center input {
        font-size: 15px;
        padding: 8px 12px;
    }
    
    .agent-title {
        font-size: 22px;
    }
    
    .agent-description {
        font-size: 14px;
    }
    
    .feature-item {
        min-width: 180px;
        padding: 12px;
    }
    
    .agent-icon i {
        font-size: 50px;
    }
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animation for showing chat */
.chat-messages.show {
    display: block !important;
    animation: fadeIn 0.3s ease-out;
}

.welcome-section.hide {
    display: none;
}

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

/* Homepage Styles */
.homepage-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
}

.hero-section {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 0;
    position: relative;
}

.hero-logo {
    margin-bottom: 24px;
}

.alpar-logo-large {
    width: 120px;
    height: 120px;
    object-fit: contain;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 0 30px rgba(0, 122, 255, 0.4));
    transition: all 0.3s ease;
}

.alpar-logo-large:hover {
    transform: scale(1.1) rotate(5deg);
    filter: drop-shadow(0 0 50px rgba(0, 122, 255, 0.8));
    animation-play-state: paused;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #007AFF, #34C759, #FF9500);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 24px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 24px 0;
}

.hero-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin: 20px 0;
}

.feature-card {
    background: rgba(44, 44, 46, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007AFF, #34C759, #FF9500);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover {
    background: rgba(44, 44, 46, 0.6);
    border-color: rgba(0, 122, 255, 0.4);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 122, 255, 0.2);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    margin-bottom: 20px;
}

.feature-icon i {
    font-size: 32px;
    color: #007AFF;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.feature-card:hover .feature-icon i {
    transform: scale(1.2) rotate(5deg);
    color: #34C759;
    text-shadow: 0 0 20px rgba(52, 199, 89, 0.5);
}

.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
}

.feature-card p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin: 0;
}

.mission-section {
    text-align: center;
    margin: 40px 0;
    padding: 40px;
    background: rgba(0, 122, 255, 0.05);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 20px;
}

.mission-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 24px 0;
}

.mission-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

.mission-vision-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.mission-content, .vision-content {
    background: rgba(44, 44, 46, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: left;
}

.mission-content h3, .vision-content h3 {
    font-size: 24px;
    font-weight: 600;
    color: #007AFF;
    margin: 0 0 16px 0;
    text-align: center;
}

.mission-content p, .vision-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0;
    text-align: left;
}

.cta-section {
    text-align: center;
    margin: 40px 0;
}

.cta-section h2 {
    font-size: 32px;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.cta-section p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 32px 0;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
}

.cta-button.primary {
    background: linear-gradient(135deg, #007AFF, #0056CC);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 122, 255, 0.3);
}

.cta-button.primary:hover {
    background: linear-gradient(135deg, #0056CC, #004499);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 122, 255, 0.5);
}

.cta-button.secondary {
    background: rgba(44, 44, 46, 0.8);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-button.secondary:hover {
    background: rgba(44, 44, 46, 1);
    border-color: rgba(0, 122, 255, 0.5);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 122, 255, 0.3);
}

.cta-button i {
    font-size: 18px;
}

/* Homepage Chat Input */
.homepage-chat-input {
    margin: 40px 0;
    text-align: center;
    background: rgba(0, 122, 255, 0.05);
    border: 1px solid rgba(0, 122, 255, 0.2);
    border-radius: 20px;
    padding: 32px 24px;
}

.chat-input-title {
    font-size: 20px;
    font-weight: 600;
    color: #007AFF;
    margin: 0 0 20px 0;
    text-align: center;
}

.chat-input-container {
    display: flex;
    align-items: center;
    background: rgba(44, 44, 46, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 8px;
    max-width: 500px;
    margin: 0 auto 12px auto;
    transition: all 0.3s ease;
}

.chat-input-container:focus-within {
    border-color: rgba(0, 122, 255, 0.5);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.2);
    transform: scale(1.02);
}

.chat-input-container input {
    flex: 1;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    padding: 12px 16px;
    outline: none;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, sans-serif;
}

.chat-input-container input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-send-button {
    background: #007AFF;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.chat-send-button:hover {
    background: #0056CC;
    transform: scale(1.1);
}

.chat-send-button:disabled {
    background: #48484A;
    cursor: not-allowed;
    transform: none;
}

.chat-hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    font-style: italic;
}



/* Agent Section Styles - Only show in agent tab */
.agent-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Hide agent section in other tabs */
.tab-content:not(.active) .agent-section {
    display: none !important;
}

/* Hide all Ali-related content in other tabs */
.tab-content:not(.active) .agent-icon,
.tab-content:not(.active) .agent-title,
.tab-content:not(.active) .agent-description,
.tab-content:not(.active) .agent-features,
.tab-content:not(.active) .agent-instructions {
    display: none !important;
}

/* D-ID Agent Container - Only show in agent tab */
#agentContent {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    width: 100%;
    position: relative;
}

/* Hide agent section when agent is loaded */
#agentContent.agent-loaded .agent-section {
    display: none;
}

/* D-ID Agent Container */
#did-agent-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 70vh;
    max-width: 800px;
    max-height: 600px;
    z-index: 1000;
    background: #151517;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* D-ID Agent Styling - Only in agent tab */
#did-agent-container [data-name="did-agent"] {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: none !important;
    display: block !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1001 !important;
    background: #151517 !important;
}

/* Force D-ID agent iframe sizing */
#did-agent-container [data-name="did-agent"] iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: none !important;
    border-radius: 12px !important;
}

/* Force D-ID agent container */
#did-agent-container [data-name="did-agent"] > div {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
}

/* Additional D-ID agent styling */
#did-agent-container [data-name="did-agent"] * {
    max-width: 100% !important;
}

/* Force visibility */
#did-agent-container [data-name="did-agent"] {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Hide agent container when not in agent tab */
.tab-content:not(.active) #did-agent-container {
    display: none !important;
}

/* Hide input bar when in Ali tab */
body.sofia-active .bottom-input-bar {
    display: none !important;
}

.agent-icon {
    margin-bottom: 24px;
    position: relative;
}

.agent-icon i {
    font-size: 80px;
    color: #007AFF;
    animation: agentPulse 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(0, 122, 255, 0.3));
}

@keyframes agentPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.agent-title {
    font-size: 36px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 16px 0;
}

.agent-description {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0 0 32px 0;
}

.agent-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin: 32px 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: rgba(44, 44, 46, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(44, 44, 46, 0.5);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 24px;
    color: #007AFF;
}

.feature-item span {
    font-size: 14px;
    color: #ffffff;
    font-weight: 500;
}

.agent-instructions {
    text-align: left;
    background: rgba(44, 44, 46, 0.3);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 32px;
}

.agent-instructions h3 {
    color: #007AFF;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.agent-instructions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.agent-instructions li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    line-height: 1.6;
    margin: 8px 0;
    padding-left: 20px;
    position: relative;
}

.agent-instructions li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #007AFF;
    font-weight: bold;
}

/* Landscape Orientation for Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .main-content {
        padding: 100px 20px 100px 20px;
    }
    
    .welcome-text {
        font-size: 24px;
    }
    
    .alpar-logo {
        width: 50px;
        height: 50px;
    }
    
    .agent-section {
        padding: 20px;
    }
    
    /* Responsive D-ID Agent Container */
    #did-agent-container {
        width: 95% !important;
        height: 60vh !important;
        max-height: 500px !important;
    }
    
    .agent-features {
        flex-direction: row;
        gap: 20px;
    }
    
    .feature-item {
        min-width: 120px;
        padding: 12px;
    }
    
    .agent-instructions {
        padding: 16px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .tab-button {
        padding: 12px 20px;
        min-height: 44px;
    }
    
    .menu-button, .add-button {
        padding: 14px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .attach-button, .send-button {
        min-height: 44px;
        min-width: 44px;
    }
    
    .pill-button {
        padding: 10px 16px;
        min-height: 44px;
    }
    
    .action-button {
        width: 32px;
        height: 32px;
    }
    
    .collapsible-header {
        padding: 16px 20px;
        min-height: 44px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .alpar-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .agent-icon i {
        text-rendering: optimizeLegibility;
    }
}

/* Homepage Responsive Styles */
@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .hero-description {
        font-size: 16px;
    }
    
    .alpar-logo-large {
        width: 100px;
        height: 100px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }
    
    .feature-card {
        padding: 24px 20px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
    
    .feature-card p {
        font-size: 15px;
    }
    
    .mission-section {
        padding: 30px 20px;
        margin: 30px 0;
    }
    
    .mission-section h2 {
        font-size: 28px;
    }
    
    .mission-section p {
        font-size: 16px;
    }
    
    .mission-vision-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mission-content, .vision-content {
        padding: 24px 20px;
    }
    
    .mission-content h3, .vision-content h3 {
        font-size: 20px;
    }
    
    .mission-content p, .vision-content p {
        font-size: 15px;
    }
    
    .cta-section h2 {
        font-size: 28px;
    }
    
    .cta-section p {
        font-size: 16px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
    }
    
    .chat-input-container {
        max-width: 400px;
    }
    
    .chat-input-container input {
        font-size: 15px;
        padding: 10px 14px;
    }
    
    .chat-send-button {
        width: 36px;
        height: 36px;
    }
    
    .chat-input-title {
        font-size: 18px;
    }
    
    .homepage-chat-input {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .hero-description {
        font-size: 15px;
    }
    
    .alpar-logo-large {
        width: 80px;
        height: 80px;
    }
    
    .feature-card {
        padding: 20px 16px;
    }
    
    .feature-card h3 {
        font-size: 16px;
    }
    
    .feature-card p {
        font-size: 14px;
    }
    
    .mission-section {
        padding: 24px 16px;
        margin: 20px 0;
    }
    
    .mission-section h2 {
        font-size: 24px;
    }
    
    .mission-section p {
        font-size: 15px;
    }
    
    .mission-vision-content {
        gap: 20px;
    }
    
    .mission-content, .vision-content {
        padding: 20px 16px;
    }
    
    .mission-content h3, .vision-content h3 {
        font-size: 18px;
    }
    
    .mission-content p, .vision-content p {
        font-size: 14px;
    }
    
    .cta-section h2 {
        font-size: 24px;
    }
    
    .cta-section p {
        font-size: 15px;
    }
    
    .cta-button {
        padding: 14px 24px;
        font-size: 15px;
    }
    
    .chat-input-container {
        max-width: 350px;
    }
    
    .chat-input-container input {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .chat-send-button {
        width: 32px;
        height: 32px;
    }
    
    .chat-hint {
        font-size: 13px;
    }
    
    .chat-input-title {
        font-size: 16px;
    }
    
    .homepage-chat-input {
        padding: 20px 16px;
    }
    
    /* Agent tablet styles */
    #agentContent {
        min-height: 75vh;
        padding: 30px 15px;
    }
    
    #agentContent [data-name="did-agent"] {
        height: 65vh !important;
        min-height: 500px !important;
        max-width: 95% !important;
    }
    
    .podcast-section h2 {
        font-size: 28px;
    }
    
    .podcast-section p {
        font-size: 16px;
    }
    
    .podcast-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }
    
    .podcast-card {
        padding: 24px;
    }
    
    .podcast-header {
        flex-direction: column;
        text-align: center;
        margin-bottom: 15px;
    }
    
    .podcast-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .podcast-info h3 {
        font-size: 18px;
    }
    
    .podcast-info p {
        font-size: 13px;
    }
    
    /* Agent responsive styles */
    #agentContent {
        min-height: 70vh;
        padding: 20px 10px;
    }
    
    #agentContent [data-name="did-agent"] {
        height: 60vh !important;
        min-height: 400px !important;
        max-width: 100% !important;
    }
}
