/* Design System CSS */
:root {
    --background: hsl(0, 0%, 7%);
    --foreground: hsl(0, 0%, 95%);
    --card: hsl(0, 0%, 12%);
    --card-foreground: hsl(0, 0%, 95%);
    --muted: hsl(0, 0%, 15%);
    --muted-foreground: hsl(0, 0%, 65%);
    --border: hsl(0, 0%, 20%);
    --primary: hsl(0, 84%, 60%);
    --radius: 0.5rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, hsl(0, 0%, 7%) 0%, hsl(0, 15%, 10%) 100%);
    color: var(--foreground);
    min-height: 100vh;
    line-height: 1.6;
}

/* Utility Classes */
.min-h-screen {
    min-height: 100vh;
}

.text-foreground {
    color: var(--foreground);
}

.text-muted-foreground {
    color: var(--muted-foreground);
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-3 {
    padding: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-16 {
    margin-top: 4rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-4xl {
    max-width: 56rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.max-w-2xl {
    max-width: 42rem;
}

.w-4 {
    width: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.w-8 {
    width: 2rem;
}

.w-16 {
    width: 4rem;
}

.w-32 {
    width: 8rem;
}

.w-3 {
    width: 0.75rem;
}

.w-full {
    width: 100%;
}

.h-4 {
    height: 1rem;
}

.h-5 {
    height: 1.25rem;
}

.h-8 {
    height: 2rem;
}

.h-16 {
    height: 4rem;
}

.h-32 {
    height: 8rem;
}

.h-3 {
    height: 0.75rem;
}

.h-full {
    height: 100%;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-3 {
    gap: 0.75rem;
}

.text-center {
    text-align: center;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-b-lg {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.border {
    border-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.hidden {
    display: none;
}

.fixed {
    position: fixed;
}

.top-6 {
    top: 1.5rem;
}

.left-6 {
    left: 1.5rem;
}

.z-50 {
    z-index: 50;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

.resize-none {
    resize: none;
}

.min-h-80px {
    min-height: 80px;
}

.max-h-120px {
    max-height: 120px;
}

.disabled\:opacity-50:disabled {
    opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
}

/* Responsive Grid */
.grid {
    display: grid;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Glass Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.hover\:glow:hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

.group:hover .group-hover\:glow {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
}

/* Text Gradient */
.text-gradient {
    background: linear-gradient(135deg, hsl(0, 84%, 60%) 0%, hsl(0, 100%, 75%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Color Classes */
.text-red-300 {
    color: rgb(252, 165, 165);
}

.text-red-400 {
    color: rgb(248, 113, 113);
}

.text-blue-300 {
    color: rgb(147, 197, 253);
}

.text-blue-400 {
    color: rgb(96, 165, 250);
}

.text-green-300 {
    color: rgb(134, 239, 172);
}

.text-green-400 {
    color: rgb(74, 222, 128);
}

.text-orange-300 {
    color: rgb(253, 186, 116);
}

.text-yellow-400 {
    color: rgb(250, 204, 21);
}

.text-gray-300 {
    color: rgb(209, 213, 219);
}

.text-gray-400 {
    color: rgb(156, 163, 175);
}

.bg-red-400 {
    background-color: rgb(248, 113, 113);
}

.bg-green-400 {
    background-color: rgb(74, 222, 128);
}

.bg-yellow-400 {
    background-color: rgb(250, 204, 21);
}

.bg-black\/20 {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Background Colors with Opacity */
.bg-red-500\/20 {
    background-color: rgba(239, 68, 68, 0.2);
}

.bg-blue-500\/20 {
    background-color: rgba(59, 130, 246, 0.2);
}

.bg-green-500\/20 {
    background-color: rgba(34, 197, 94, 0.2);
}

.bg-orange-500\/20 {
    background-color: rgba(249, 115, 22, 0.2);
}

.bg-gray-500\/20 {
    background-color: rgba(107, 114, 128, 0.2);
}

/* Border Colors with Opacity */
.border-red-500\/20 {
    border-color: rgba(239, 68, 68, 0.2);
}

.border-red-500\/30 {
    border-color: rgba(239, 68, 68, 0.3);
}

.border-blue-500\/20 {
    border-color: rgba(59, 130, 246, 0.2);
}

.border-blue-500\/30 {
    border-color: rgba(59, 130, 246, 0.3);
}

.border-green-500\/20 {
    border-color: rgba(34, 197, 94, 0.2);
}

.border-green-500\/30 {
    border-color: rgba(34, 197, 94, 0.3);
}

.border-orange-500\/30 {
    border-color: rgba(249, 115, 22, 0.3);
}

.border-yellow-500\/20 {
    border-color: rgba(234, 179, 8, 0.2);
}

.border-gray-500\/20 {
    border-color: rgba(107, 114, 128, 0.2);
}

.border-gray-500\/30 {
    border-color: rgba(107, 114, 128, 0.3);
}

/* Transitions */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-300 {
    transition-duration: 0.3s;
}

.duration-500 {
    transition-duration: 0.5s;
}

/* Hover Effects */
.hover\:bg-red-500\/30:hover {
    background-color: rgba(239, 68, 68, 0.3);
}

.hover\:bg-blue-500\/30:hover {
    background-color: rgba(59, 130, 246, 0.3);
}

.hover\:bg-green-500\/30:hover {
    background-color: rgba(34, 197, 94, 0.3);
}

.hover\:bg-orange-500\/30:hover {
    background-color: rgba(249, 115, 22, 0.3);
}

.hover\:border-red-500\/40:hover {
    border-color: rgba(239, 68, 68, 0.4);
}

.hover\:border-red-500\/50:hover {
    border-color: rgba(239, 68, 68, 0.5);
}

.hover\:border-blue-500\/40:hover {
    border-color: rgba(59, 130, 246, 0.4);
}

.hover\:border-blue-500\/50:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.hover\:border-green-500\/40:hover {
    border-color: rgba(34, 197, 94, 0.4);
}

.hover\:border-green-500\/50:hover {
    border-color: rgba(34, 197, 94, 0.5);
}

.hover\:border-orange-500\/50:hover {
    border-color: rgba(249, 115, 22, 0.5);
}

.group:hover .group-hover\:text-blue-400 {
    color: rgb(96, 165, 250);
}

.group:hover .group-hover\:text-green-400 {
    color: rgb(74, 222, 128);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(0.25rem);
}

.group .transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}

.group .transition-colors {
    transition-property: color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.3s;
}

/* Form Elements */
button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

textarea {
    font-family: inherit;
    color: var(--foreground);
    outline: none;
}

textarea:focus {
    outline: none;
}

.bg-background\/50 {
    background-color: rgba(17, 17, 17, 0.5);
}

.focus\:border-blue-500\/50:focus {
    border-color: rgba(59, 130, 246, 0.5);
}

/* Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Custom Message Styles */
.message-user {
    justify-content: flex-end;
}

.message-stranger {
    justify-content: flex-start;
}

.message-bubble-user {
    max-width: 70%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(59, 130, 246, 0.2);
    color: rgb(147, 197, 253);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.message-bubble-stranger {
    max-width: 70%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(107, 114, 128, 0.2);
    color: rgb(209, 213, 219);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.message-time {
    font-size: 0.75rem;
    opacity: 0.6;
    margin-top: 0.25rem;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}
