/* ============================================
   STORIES CREATE/EDIT - CSS VARIABLES SYSTEM
   ============================================
   সহজেই পরিবর্তনযোগ্য CSS Variables
   বাংলা ফন্ট সহ সব কিছু customize করা যাবে
   ============================================ */

:root {
    /* Layout Dimensions */
    --story-max-width: 1200px;
    --story-form-width: 100%;
    --story-gap: 20px;
    
    /* Colors */
    --story-bg: #f8fafc;
    --story-card-bg: #ffffff;
    --story-border: #e9ecef;
    --story-text-primary: #2c3e50;
    --story-text-secondary: #6c757d;
    --story-text-muted: #95a5a6;
    --story-primary: #667eea;
    --story-primary-hover: #5568d3;
    --story-success: #4caf50;
    --story-danger: #e74c3c;
    --story-warning: #f59e0b;
    --story-info: #3b82f6;
    --story-gradient-start: #667eea;
    --story-gradient-end: #764ba2;
    
    /* Spacing - % based for easy customization */
    /* Container Padding - Top/Bottom and Left/Right separately */
    --story-padding-top: 20px;
    --story-padding-bottom: 20px;
    --story-padding-left: 0%;
    --story-padding-right: 0%;
    
    /* Card/Element Padding */
    --story-padding: 20px;
    --story-padding-lg: 30px;
    --story-padding-md: 20px;
    --story-padding-sm: 15px;
    --story-padding-xs: 10px;
    
    /* Margin - % based */
    --story-margin: 0%;
    --story-margin-lg: 0%;
    --story-margin-md: 0%;
    --story-margin-sm: 0%;
    --story-margin-xs: 0%;
    
    /* Border Radius */
    --story-radius: 12px;
    --story-radius-lg: 16px;
    --story-radius-md: 12px;
    --story-radius-sm: 8px;
    --story-radius-xs: 6px;
    --story-radius-full: 50%;
    
    /* Shadows */
    --story-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --story-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
    --story-shadow-lg: 0 6px 20px rgba(102, 126, 234, 0.4);
    
    /* Typography - Bangla Font Globally Changeable */
    --story-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --story-font-family-bangla: 'Noto Sans Bengali', 'Hind Siliguri', 'Kalpurush', 'SolaimanLipi', sans-serif;
    --story-font-size-base: 1rem;
    --story-font-size-lg: 1.25rem;
    --story-font-size-xl: 1.5rem;
    --story-font-size-xxl: 2rem;
    --story-font-size-sm: 0.875rem;
    --story-font-size-xs: 0.75rem;
    --story-line-height: 1.5;
    --story-font-weight-normal: 400;
    --story-font-weight-medium: 500;
    --story-font-weight-semibold: 600;
    --story-font-weight-bold: 700;
    
    /* Form Elements */
    --story-input-height: 48px;
    --story-input-padding: 12px 16px;
    --story-input-border-width: 2px;
    --story-button-height: 48px;
    --story-button-padding: 12px 28px;
    
    /* Transitions */
    --story-transition: all 0.3s ease;
    --story-transition-fast: all 0.2s ease;
    --story-transition-slow: all 0.5s ease;
}

/* ===== Global Bangla Font Support ===== */
.bangla-text,
.story-container *,
.story-card *,
.story-form * {
    font-family: var(--story-font-family-bangla);
}

/* ===== Container ===== */
.story-container {
    max-width: var(--story-max-width);
    margin: var(--story-margin) auto;
    padding: var(--story-padding-top) var(--story-padding-right) var(--story-padding-bottom) var(--story-padding-left);
}

/* ===== Cards ===== */
.story-card {
    background: var(--story-card-bg);
    border-radius: var(--story-radius-md);
    padding: var(--story-padding-md);
    box-shadow: var(--story-shadow);
    margin-bottom: var(--story-gap);
    transition: var(--story-transition);
}

.story-card:hover {
    box-shadow: var(--story-shadow-hover);
}

.story-card-header {
    color: var(--story-primary);
    font-weight: var(--story-font-weight-bold);
    margin-bottom: var(--story-padding-md);
    padding-bottom: var(--story-padding-sm);
    border-bottom: 2px solid var(--story-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-card-header h5 {
    margin: 0;
    font-size: var(--story-font-size-lg);
}

.story-card-body {
    color: var(--story-text-primary);
}

/* ===== Story Type Selector ===== */
.story-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: var(--story-padding-md);
}

.type-option {
    background: #f8f9fa;
    border: 2px solid var(--story-border);
    border-radius: var(--story-radius-md);
    padding: var(--story-padding-md);
    text-align: center;
    cursor: pointer;
    transition: var(--story-transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: var(--story-text-primary);
}

.type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: var(--story-transition-slow);
}

.type-option:hover::before {
    left: 100%;
}

.type-option:hover {
    background: #e9ecef;
    transform: translateY(-5px);
    box-shadow: var(--story-shadow-hover);
    text-decoration: none;
}

.type-option.active {
    background: linear-gradient(135deg, var(--story-gradient-start) 0%, var(--story-gradient-end) 100%);
    color: white;
    border-color: var(--story-primary);
    transform: scale(1.05);
}

.type-option i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.type-option .type-label {
    font-weight: var(--story-font-weight-semibold);
    font-size: var(--story-font-size-sm);
}

/* ===== Story Preview Box ===== */
.story-preview-box {
    width: 100%;
    max-width: 400px;
    height: 600px;
    margin: 0 auto var(--story-padding-lg);
    border-radius: var(--story-radius-lg);
    background: linear-gradient(135deg, var(--story-gradient-start) 0%, var(--story-gradient-end) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--story-padding-lg);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.story-preview-box::after {
    content: 'PREVIEW';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: white;
    padding: 4px 12px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: var(--story-font-weight-semibold);
}

.preview-text {
    color: white;
    font-size: var(--story-font-size-xl);
    text-align: center;
    font-weight: var(--story-font-weight-semibold);
    line-height: 1.5;
    word-wrap: break-word;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* ===== Upload Zone ===== */
.upload-zone {
    border: 3px dashed #c1c1c1;
    border-radius: var(--story-radius-md);
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    cursor: pointer;
    transition: var(--story-transition);
    position: relative;
}

.upload-zone::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--story-radius-md);
    padding: 3px;
    background: linear-gradient(135deg, var(--story-gradient-start), var(--story-gradient-end));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: var(--story-transition);
}

.upload-zone:hover::before {
    opacity: 1;
}

.upload-zone:hover {
    border-color: var(--story-primary);
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    transform: scale(1.02);
}

.upload-zone i {
    font-size: 64px;
    color: var(--story-primary);
    margin-bottom: var(--story-padding-md);
    animation: bounce 2s infinite;
}

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

.upload-zone h6 {
    font-size: var(--story-font-size-lg);
    font-weight: var(--story-font-weight-semibold);
    color: var(--story-text-primary);
    margin-bottom: 10px;
}

.upload-zone p {
    color: var(--story-text-secondary);
    font-size: var(--story-font-size-sm);
}

/* ===== Media Preview ===== */
.media-preview {
    display: none;
    position: relative;
    border-radius: var(--story-radius-md);
    overflow: hidden;
    margin-top: var(--story-padding-md);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.media-preview.active {
    display: block;
    animation: slideUp 0.4s ease;
}

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

.media-preview img, .media-preview video {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #000;
}

.remove-media-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(231, 76, 60, 0.9);
    color: white;
    border: none;
    border-radius: var(--story-radius-full);
    width: 44px;
    height: 44px;
    cursor: pointer;
    font-size: 24px;
    transition: var(--story-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.remove-media-btn:hover {
    background: rgba(192, 57, 43, 1);
    transform: scale(1.1) rotate(90deg);
}

/* ===== Buttons ===== */
.story-btn {
    background: linear-gradient(135deg, var(--story-gradient-start) 0%, var(--story-gradient-end) 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: var(--story-font-weight-semibold);
    font-size: var(--story-font-size-base);
    cursor: pointer;
    transition: var(--story-transition);
    width: 100%;
    position: relative;
    overflow: hidden;
}

.story-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: var(--story-radius-full);
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.story-btn:hover::before {
    width: 300px;
    height: 300px;
}

.story-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--story-shadow-lg);
}

.story-btn:active {
    transform: translateY(-1px);
}

.story-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ===== Form Controls ===== */
.story-form-control, .story-form-select {
    border: var(--story-input-border-width) solid var(--story-border);
    border-radius: var(--story-radius-sm);
    padding: var(--story-input-padding);
    transition: var(--story-transition);
    font-size: var(--story-font-size-sm);
    width: 100%;
}

.story-form-control:focus, .story-form-select:focus {
    border-color: var(--story-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.story-form-label {
    font-weight: var(--story-font-weight-semibold);
    color: var(--story-text-primary);
    margin-bottom: 8px;
    font-size: var(--story-font-size-sm);
}

/* ===== Info Cards ===== */
.story-info-item {
    display: flex;
    align-items: start;
    margin-bottom: var(--story-padding-md);
}

.story-info-item i {
    font-size: 24px;
    margin-right: 15px;
    margin-top: 5px;
}

.story-info-item h6 {
    margin-bottom: 5px;
    font-weight: var(--story-font-weight-semibold);
}

.story-info-item p {
    color: var(--story-text-muted);
    margin: 0;
    font-size: var(--story-font-size-xs);
}

/* ===== Sidebar Links ===== */
.story-sidebar-link {
    color: var(--story-text-secondary);
    text-decoration: none;
    padding: var(--story-padding-xs);
    border-radius: var(--story-radius-xs);
    transition: var(--story-transition-fast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.story-sidebar-link:hover {
    background: #f0f0f0;
    color: var(--story-primary);
    text-decoration: none;
}

.story-sidebar-link.active {
    background: var(--story-primary);
    color: white;
}

/* ===== Responsive Design ===== */
@media (max-width: 992px) {
    .story-preview-box {
        height: 500px;
        max-width: 100%;
    }
    
    .story-type-selector {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .story-container {
        padding: var(--story-padding-sm);
    }
    
    .story-card {
        padding: var(--story-padding-sm);
    }
    
    .upload-zone {
        padding: 40px 20px;
    }
    
    .upload-zone i {
        font-size: 48px;
    }
    
    .story-type-selector {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .story-preview-box {
        height: 400px;
    }
    
    .type-option {
        padding: var(--story-padding-sm);
    }
    
    .type-option i {
        font-size: 24px;
    }
}
