/* Modern UI Enhancements for ErosDate */
/* Preserving existing color scheme: #3d38ac (primary), #A7AC38 (success), #BD9C74 (alert) */

/* Enhanced Body & Background */
body {
    background: linear-gradient(135deg, 
        rgba(61, 56, 172, 0.1) 0%, 
        rgba(167, 172, 56, 0.1) 50%, 
        rgba(189, 156, 116, 0.1) 100%),
        url("../imgs/ag-square.png");
    background-attachment: fixed;
    background-size: cover;
    background-blend-mode: overlay;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Glassmorphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Enhanced Cards */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(61, 56, 172, 0.2);
}

.card-divider {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    color: white;
    padding: 20px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-divider::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 ease;
}

.card-divider:hover::before {
    animation: shimmer 2s infinite;
}

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

/* Modern Buttons */
.button {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    color: white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(61, 56, 172, 0.3);
}

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

.button:hover::before {
    left: 100%;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 56, 172, 0.4);
}

.button.success {
    background: linear-gradient(135deg, #A7AC38, #bcc142);
    box-shadow: 0 4px 15px rgba(167, 172, 56, 0.3);
}

.button.success:hover {
    box-shadow: 0 8px 25px rgba(167, 172, 56, 0.4);
}

.button.alert {
    background: linear-gradient(135deg, #BD9C74, #d4b189);
    box-shadow: 0 4px 15px rgba(189, 156, 116, 0.3);
}

.button.alert:hover {
    box-shadow: 0 8px 25px rgba(189, 156, 116, 0.4);
}

/* Enhanced Forms */
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(61, 56, 172, 0.2);
    border-radius: 15px;
    padding: 15px 20px;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="search"]:focus, select:focus, textarea:focus {
    border-color: #3d38ac;
    box-shadow: 0 0 20px rgba(61, 56, 172, 0.2);
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
}

/* Floating Labels */
.floating-label {
    position: relative;
    margin-bottom: 20px;
}

.floating-label input {
    padding-top: 25px;
    padding-bottom: 10px;
}

.floating-label label {
    position: absolute;
    left: 20px;
    top: 15px;
    color: #999;
    font-size: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.floating-label input:focus + label,
.floating-label input:not(:placeholder-shown) + label {
    top: 5px;
    font-size: 12px;
    color: #3d38ac;
    font-weight: 600;
}

/* Enhanced Header */
.App-header {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.App-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Profile Images */
.profile-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.profile-image:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

/* Search Results */
.search-result {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(61, 56, 172, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-result:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #3d38ac;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(61, 56, 172, 0.3);
    border-radius: 50%;
    border-top-color: #3d38ac;
    animation: spin 1s ease-in-out infinite;
}

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

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Enhanced Callouts */
.callout {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.callout.success {
    border-left: 4px solid #A7AC38;
    background: linear-gradient(135deg, rgba(167, 172, 56, 0.1), rgba(255, 255, 255, 0.9));
}

.callout.alert {
    border-left: 4px solid #BD9C74;
    background: linear-gradient(135deg, rgba(189, 156, 116, 0.1), rgba(255, 255, 255, 0.9));
}

.callout.primary {
    border-left: 4px solid #3d38ac;
    background: linear-gradient(135deg, rgba(61, 56, 172, 0.1), rgba(255, 255, 255, 0.9));
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .card {
        margin: 10px;
        border-radius: 15px;
    }
    
    .button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .App-header h1 {
        font-size: 2rem;
    }
    
    .profile-image {
        width: 100px;
        height: 100px;
    }
}

/* Ripple Effect for Buttons */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4a4fb5, #3d38ac);
}

/* AI Chat Styles */
.ai-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
    flex-direction: column;
    z-index: 1001;
}

.ai-chat-header {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    color: white;
    padding: 15px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    font-weight: 600;
}

.ai-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ai-chat-input {
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0 0 20px 20px;
    display: flex;
    gap: 10px;
}

.ai-chat-input input {
    flex: 1;
    border: 1px solid rgba(61, 56, 172, 0.3);
    border-radius: 25px;
    padding: 10px 15px;
    font-size: 14px;
}

.ai-chat-input button {
    border-radius: 25px;
    padding: 10px 20px;
    font-size: 14px;
}

.ai-message {
    background: rgba(61, 56, 172, 0.1);
    border-radius: 15px 15px 15px 5px;
    padding: 10px 15px;
    margin-bottom: 10px;
    border: 1px solid rgba(61, 56, 172, 0.2);
}

.user-message {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    color: white;
    border-radius: 15px 15px 5px 15px;
    padding: 10px 15px;
    margin-bottom: 10px;
    margin-left: auto;
    max-width: 80%;
}

.ai-chat-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(61, 56, 172, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.ai-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(61, 56, 172, 0.4);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(61, 56, 172, 0.1);
    border-radius: 15px;
    margin-bottom: 10px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3d38ac;
    animation: typing 1.4s infinite ease-in-out;
}

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

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

/* Stats box styling */
.stats-box {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
}

.stats-box h3 {
    margin-bottom: 1rem;
    color: #3d38ac;
}

.stats-box p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.stats-box i {
    margin-right: 0.5rem;
    color: #A7AC38;
}

/* Tab Interface */
.tabs-container {
    display: flex;
    border-bottom: 2px solid rgba(61, 56, 172, 0.2);
    margin-bottom: 1.5rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 2rem;
    cursor: pointer;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.tab-button:hover {
    color: #3d38ac;
    background: rgba(61, 56, 172, 0.1);
}

.tab-button.active {
    color: #3d38ac;
    border-bottom-color: #3d38ac;
    background: rgba(61, 56, 172, 0.1);
}

.tab-button i {
    margin-right: 0.5rem;
}

.tab-content {
    padding: 1rem 0;
}

/* Chat Messages */
.chat-messages {
    max-height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 1rem;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    border-left: 3px solid #A7AC38;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.username {
    font-weight: 600;
    color: #3d38ac;
    text-decoration: none;
}

.username:hover {
    color: #4a4fb5;
}

.timestamp {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.message-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.no-messages {
    text-align: center;
    padding: 2rem;
    color: rgba(255, 255, 255, 0.6);
}

.no-messages i {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
    color: #A7AC38;
}

/* Chat Input */
.chat-input-container {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.chat-input-container textarea,
.chat-input-container input {
    flex: 1;
    resize: vertical;
    min-height: 60px;
}

.glass-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.glass-input:focus {
    border-color: #3d38ac;
    box-shadow: 0 0 0 2px rgba(61, 56, 172, 0.2);
    outline: none;
}

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

/* AI Chat Specific */
.ai-chat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(61, 56, 172, 0.1), rgba(167, 172, 56, 0.1));
    border-radius: 10px;
    margin-bottom: 1rem;
}

.ai-avatar-large {
    font-size: 3rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(61, 56, 172, 0.3);
}

.ai-intro h3 {
    margin: 0 0 0.5rem 0;
    color: #3d38ac;
}

.ai-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
}

.ai-message {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(61, 56, 172, 0.1);
    border-radius: 15px 15px 15px 5px;
    border: 1px solid rgba(61, 56, 172, 0.2);
}

.user-message {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.user-message .message-text {
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    color: white;
    padding: 0.75rem;
    border-radius: 15px 15px 5px 15px;
    max-width: 80%;
}

.ai-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3d38ac, #4a4fb5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.ai-text,
.message-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

.ai-welcome {
    text-align: center;
    padding: 1rem;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: rgba(61, 56, 172, 0.1);
    border-radius: 15px;
}

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

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3d38ac;
    animation: typing 1.4s infinite ease-in-out;
}

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