/* AI Bhai Stories Section - Vibrant Professional Design */
.stories-section {
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color-1: #ffe66d;
    --accent-color-2: #ff9f1c;
    --accent-color-3: #bf4e6b;
    --text-dark: #2d3436;
    --text-light: #f9f9f9;
    --bg-gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bg-gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --bg-gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --card-bg-1: rgba(255, 107, 107, 0.1);
    --card-bg-2: rgba(78, 205, 196, 0.1);
    --card-bg-3: rgba(255, 159, 28, 0.1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.2);
    --border-radius: 24px;
    --spacing: 1.5rem;
    
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    font-family: 'Segoe UI', Tahoma, system-ui, -apple-system, sans-serif;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Reset any conflicting styles */
.stories-section * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.stories-section .stories-box {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg), 0 0 0 2px rgba(255, 107, 107, 0.3);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animated background effect */
.stories-section .stories-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,107,107,0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
    z-index: 0;
}

/* Header Styles */
.stories-section .stories-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--accent-color-1);
}

.stories-section .stories-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.stories-section .stories-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    position: relative;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
    background: linear-gradient(135deg, #ffe66d, #ff9f1c, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(255,230,109,0.5); }
    to { text-shadow: 0 0 20px rgba(255,107,107,0.8); }
}

.stories-section .stories-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    color: #e0e0e0;
    font-weight: 400;
}

/* Today's Story Section */
.stories-section .today-story {
    padding: 2rem;
    background: linear-gradient(145deg, rgba(255,107,107,0.1) 0%, rgba(78,205,196,0.1) 100%);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stories-section .story-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #ff6b6b, #ff9f1c);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 60px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(255,107,107,0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

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

.stories-section .story-btn:hover::before {
    left: 100%;
}

.stories-section .story-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255,107,107,0.6);
    background: linear-gradient(135deg, #ff9f1c, #ff6b6b);
}

.stories-section .story-icon {
    font-size: 1.8rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.stories-section .story-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 5px solid #ff6b6b;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.stories-section .story-text {
    font-size: 1.3rem;
    line-height: 1.8;
    color: #e0e0e0;
    font-style: italic;
    margin-bottom: 1rem;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.stories-section .story-signature {
    text-align: right;
    font-weight: 600;
    color: #ffe66d;
    font-size: 1.1rem;
    position: relative;
}

/* Image Container */
.stories-section .story-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin: 0;
}

.stories-section .story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    filter: brightness(0.8);
}

.stories-section .story-image-container:hover .story-image {
    transform: scale(1.05);
    filter: brightness(1);
}

.stories-section .image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent, rgba(255,107,107,0.3));
    padding: 3rem 2rem 2rem;
    color: white;
}

.stories-section .overlay-text {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    display: block;
    animation: slideUp 0.5s ease;
    color: white;
    background: linear-gradient(135deg, #ffe66d, #ff9f1c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Memories Section */
.stories-section .memories-section {
    padding: 2rem;
    background: linear-gradient(145deg, #16213e 0%, #1a1a2e 100%);
    position: relative;
}

.stories-section .memories-title {
    font-size: 2rem;
    color: #e0e0e0;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.stories-section .memories-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to right, #ff6b6b, #ffe66d, #4ecdc4);
    border-radius: 2px;
}

.stories-section .memory-item {
    display: flex;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 107, 107, 0.2);
    backdrop-filter: blur(10px);
}

/* Different colors for each memory item */
.stories-section .memory-item:nth-child(1) {
    background: linear-gradient(145deg, rgba(255,107,107,0.15), rgba(78,205,196,0.05));
    border-left: 5px solid #ff6b6b;
}

.stories-section .memory-item:nth-child(2) {
    background: linear-gradient(145deg, rgba(78,205,196,0.15), rgba(255,230,109,0.05));
    border-left: 5px solid #4ecdc4;
}

.stories-section .memory-item:nth-child(3) {
    background: linear-gradient(145deg, rgba(255,230,109,0.15), rgba(255,107,107,0.05));
    border-left: 5px solid #ffe66d;
}

.stories-section .memory-item:hover {
    transform: translateX(10px) scale(1.02);
    box-shadow: 0 10px 25px rgba(255,107,107,0.3);
    border-color: rgba(255,230,109,0.5);
}

.stories-section .memory-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff6b6b, #ff9f1c);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(255,107,107,0.5);
}

.stories-section .memory-content {
    flex: 1;
}

.stories-section .memory-name {
    font-size: 1.2rem;
    color: #ffe66d;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.stories-section .memory-quote {
    color: #e0e0e0;
    line-height: 1.6;
    font-size: 1rem;
}

/* Footer - Note Style */
.stories-section .stories-footer {
    margin-top: 2rem;
    padding: 2rem;
    background: transparent;
    border-radius: 0;
    text-align: center;
    position: relative;
    border-top: 2px dashed rgba(255,230,109,0.3);
}

.stories-section .footer-text {
    color: #a0a0a0;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
    padding: 0 1rem;
    background: rgba(26, 26, 46, 0.8);
    border-radius: 50px;
}

/* Floating particles effect */
.stories-section .stories-box::after {
    content: '✦ ✧ ✦ ✧ ✦';
    position: absolute;
    bottom: 10px;
    right: 20px;
    color: rgba(255,230,109,0.3);
    font-size: 1.2rem;
    pointer-events: none;
    animation: twinkle 3s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stories-section {
        padding: 1rem;
    }
    
    .stories-section .stories-title {
        font-size: 2rem;
    }
    
    .stories-section .stories-subtitle {
        font-size: 1rem;
    }
    
    .stories-section .today-story {
        padding: 1rem;
    }
    
    .stories-section .story-btn {
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        padding: 1rem;
    }
    
    .stories-section .story-text {
        font-size: 1.1rem;
    }
    
    .stories-section .story-image-container {
        height: 300px;
    }
    
    .stories-section .overlay-text {
        font-size: 1.5rem;
    }
    
    .stories-section .memory-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .stories-section .memory-item:hover {
        transform: translateY(-5px) scale(1.02);
    }
}

@media (max-width: 480px) {
    .stories-section .stories-title {
        font-size: 1.5rem;
    }
    
    .stories-section .story-image-container {
        height: 250px;
    }
    
    .stories-section .memories-title {
        font-size: 1.5rem;
    }
}

/* Dark mode enhancement */
@media (prefers-color-scheme: dark) {
    .stories-section .stories-box {
        background: linear-gradient(145deg, #0f0f1f 0%, #1a1a2e 100%);
    }
}

/* Loading State */
.stories-section.loading {
    opacity: 0.6;
    pointer-events: none;
}

.stories-section.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top: 3px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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