/* Modern Instagram-Inspired Styles */

:root {
    /* Instagram-inspired color palette */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #1dd1a1;
    --warning-color: #ff6b6b;
    --info-color: #48dbfb;
    
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e1e8ed;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header Styles */
header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.5rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0 0 1rem 2rem;
    background: linear-gradient(to right, #fff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navigation */
nav ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0 2rem;
    flex-wrap: wrap;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    font-weight: 500;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* Headings */
h2, h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

h2 {
    font-size: 2rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Forms */
form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

input[type="text"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    font-family: inherit;
    resize: vertical;
}

/* Buttons */
button,
.btn,
a.btn {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    display: inline-block;
}

button:hover,
.btn:hover,
a.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

button:active,
.btn:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Button Variants */
button[type="submit"],
#check-stories-btn {
    background: var(--success-gradient);
}

.btn-danger,
button[style*="background: #ff6b6b"],
a[style*="background: #ff6b6b"] {
    background: var(--secondary-gradient) !important;
}

.btn-info,
button[style*="background: #3498db"] {
    background: var(--success-gradient) !important;
}

/* Tables */
table {
    width: 100%;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}

thead tr {
    background: var(--primary-gradient);
    color: white;
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Alternating row colors */
tbody tr:nth-child(even) {
    background-color: rgba(248, 249, 250, 0.5);
}

tbody tr:nth-child(even):hover {
    background-color: rgba(102, 126, 234, 0.05);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.85em;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius-sm);
    text-align: center;
}

.badge-success {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #0ca678;
}

.badge-warning {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #d63031;
}

.badge-info {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #0984e3;
}

/* Flash Messages */
.flash-messages {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.flash-messages li {
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-sm);
    background: var(--success-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Section */
.filter-section {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-section select {
    width: auto;
    min-width: 250px;
}

/* Selection Controls */
.selection-controls {
    background: var(--bg-white);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.selection-counter {
    font-weight: 600;
    color: var(--primary-color);
}

/* Checkboxes */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #e0f7fa 0%, #e1f5fe 100%);
    border-left: 4px solid var(--info-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
}

.help-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.empty-state p:first-child {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Progress Bar */
.progress-bar {
    width: 100px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
    border-radius: 12px;
}

.progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85em;
    font-weight: bold;
    color: var(--text-dark);
}

/* Sortable Headers */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    position: relative;
}

.sortable:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
        margin-left: 1rem;
    }
    
    nav ul {
        padding: 0 1rem;
        gap: 0.3rem;
    }
    
    nav ul li a {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    main {
        padding: 0 1rem;
    }
    
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.data-table tr {
    animation: fadeIn 0.3s ease;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Utility Classes */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-light); }
.font-bold { font-weight: 600; }
