@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Font Awesome Fallback */
@font-face {
    font-family: 'FontAwesome';
    src: url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/webfonts/fa-solid-900.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* Icon fallbacks */
.fas, .far, .fab {
    font-family: 'FontAwesome', 'Font Awesome 6 Free', 'Font Awesome 6 Pro', sans-serif;
    font-weight: 900;
    display: inline-block;
}

.far {
    font-weight: 400;
}

:root {
    --ahiler-red: #dc2626;
    --ahiler-red-dark: #b91c1c;
    --ahiler-red-light: #fecaca;
    --ahiler-red-bg: #fef2f2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--ahiler-red-bg) 0%, #fee2e2 100%);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ahiler-red);
    font-weight: 700;
    font-size: 24px;
    text-decoration: none;
}

.logo-image {
    width: 100%;
    height: 50px;
    object-fit: contain;
    border-radius: 8px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
}

.auth-logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 16px;
}

.search-bar {
    position: relative;
    max-width: 300px;
    width: 100%;
    margin: 0 20px;
}

.search-bar input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid var(--gray-200);
    border-radius: 24px;
    background: var(--gray-100);
    outline: none;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    background: white;
    border-color: var(--ahiler-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    width: 16px;
    height: 16px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--ahiler-red);
    background: rgba(220, 38, 38, 0.1);
}

.nav-link i {
    font-size: 20px;
}

/* Main Layout */
.main-layout {
    max-width: 1200px;
    margin: 24px auto;
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 24px;
    padding: 0 24px;
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
        padding: 16px;
        gap: 16px;
    }
    
    .left-sidebar,
    .right-sidebar {
        display: none;
    }
}

/* Mobile Navigation */
.mobile-header {
    display: none;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.mobile-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 600;
}

.mobile-logo .logo-image {
    width: 100%;
    height: 60px;
}

.mobile-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.mobile-action-btn {
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.mobile-action-btn:hover {
    background: var(--gray-100);
    color: var(--ahiler-red);
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--gray-200);
    padding: 8px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    text-decoration: none;
    color: var(--gray-500);
    font-size: 10px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 0;
}

.mobile-nav-item:hover {
    color: var(--ahiler-red);
}

.mobile-nav-item.active {
    color: var(--ahiler-red);
}

.mobile-nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
}

.mobile-nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 10px;
    overflow: hidden;
}

.mobile-nav-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

@media (max-width: 768px) {
    /* Hide desktop navigation */
    .desktop-nav {
        display: none !important;
    }
    
    /* Show mobile header */
    .mobile-header {
        display: block;
    }
    
    /* Show mobile bottom navigation */
    .mobile-bottom-nav {
        display: flex;
    }
    
    /* Add bottom padding to main content for mobile nav */
    .main-layout {
        padding-bottom: 80px;
    }
    
    /* Adjust main content for mobile */
    .main-content {
        margin-bottom: 0;
    }
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 80px;
}

/* Profile Card */
.profile-card {
    overflow: hidden;
}

.profile-cover {
    height: 80px;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    position: relative;
}

.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 24px;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    padding: 48px 16px 16px;
    text-align: center;
}

.profile-info h3 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.profile-info .title {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.stat-label {
    color: var(--gray-600);
}

.stat-value {
    font-weight: 600;
    color: var(--ahiler-red);
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-user-info h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.post-user-info .user-title {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 2px;
}

.post-time {
    font-size: 12px;
    color: var(--gray-500);
}

.post-content {
    padding: 0 16px 16px;
}

.post-text {
    color: var(--gray-800);
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-image {
    width: 100%;
    border-radius: 8px;
    margin-top: 12px;
}

.post-stats {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
    font-size: 14px;
    color: var(--gray-600);
}

.post-actions {
    display: flex;
    border-top: 1px solid var(--gray-200);
}

.action-btn {
    flex: 1;
    background: none;
    border: none;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.action-btn:hover {
    background: var(--gray-50);
    color: var(--ahiler-red);
}

.action-btn.liked {
    color: var(--ahiler-red);
}

.action-btn:not(:last-child) {
    border-right: 1px solid var(--gray-200);
}

/* Create Post */
.create-post {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.create-post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.create-post-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
}

.create-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.create-post-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.create-post-input {
    width: 100%;
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--gray-50);
    outline: none;
    font-size: 16px;
    resize: vertical;
    min-height: 60px;
    transition: all 0.2s ease;
}

.create-post-input:focus {
    background: white;
    border-color: var(--ahiler-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.create-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-options {
    display: flex;
    gap: 16px;
}

.option-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    background: none;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: var(--gray-100);
    color: var(--ahiler-red);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--ahiler-red);
    color: white;
    border-color: var(--ahiler-red);
}

.btn-primary:hover {
    background: var(--ahiler-red-dark);
    border-color: var(--ahiler-red-dark);
}

.btn-outline {
    background: transparent;
    color: var(--ahiler-red);
    border-color: var(--ahiler-red);
}

.btn-outline:hover {
    background: var(--ahiler-red);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

/* Stories Section */
.stories-section {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    margin-bottom: 24px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stories-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.stories-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.stories-list {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 70px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-item:hover {
    transform: translateY(-2px);
}

.story-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--ahiler-red);
}

.story-avatar.add-story {
    background: var(--gray-100);
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    text-align: center;
    max-width: 70px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Sections */
.sidebar-section {
    padding: 20px;
}

.sidebar-section:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 16px;
}

.sidebar-title i {
    color: var(--ahiler-red);
}

.sidebar-item {
    display: block;
    padding: 12px 0;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    color: var(--ahiler-red);
    padding-left: 8px;
}

/* User Navigation */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-avatar-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    overflow: hidden;
    transition: all 0.2s ease;
}

.user-avatar-nav:hover {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.user-avatar-nav img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.dropdown-name {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 2px;
}

.dropdown-title {
    font-size: 14px;
    color: var(--gray-600);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--gray-50);
    color: var(--ahiler-red);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

/* Notification Badge */
.nav-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--ahiler-red);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
        margin: 16px auto;
        padding: 0 16px;
        gap: 16px;
        padding-bottom: 100px; /* Extra space for bottom nav */
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .stories-list {
        gap: 12px;
        overflow-x: auto;
        padding-bottom: 8px;
    }
    
    .story-item {
        min-width: 60px;
        flex-shrink: 0;
    }
    
    .story-avatar {
        width: 56px;
        height: 56px;
        font-size: 16px;
    }
    
    .story-name {
        font-size: 11px;
        max-width: 60px;
    }
    
    /* Hide sidebars on mobile */
    .left-sidebar,
    .right-sidebar {
        display: none;
    }
    
    /* Fix post cards width */
    .post-card {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .create-post {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix stories section */
    .stories-section {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix profile page mobile */
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 16px !important;
        margin: 16px auto !important;
        box-sizing: border-box !important;
    }
    
    .profile-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .profile-cover {
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .profile-avatar-large {
        width: 80px !important;
        height: 80px !important;
        font-size: 24px !important;
        top: -40px !important;
        left: 16px !important;
    }
    
    .profile-info {
        padding: 0 16px 16px !important;
    }
    
    .profile-actions {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: stretch !important;
    }
    
    .profile-actions .btn {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Fix ahiler page mobile */
    .filters-section {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 16px !important;
    }
    
    .filter-form {
        flex-direction: column !important;
        gap: 12px !important;
    }
    
    .filter-form .form-group {
        width: 100% !important;
        margin-bottom: 12px !important;
    }
    
    .filter-form select,
    .filter-form input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .ahiler-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    
    .ahi-card {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .ahi-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .ahi-actions .btn {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Fix all pages mobile width */
    .page-header {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .page-header h1 {
        font-size: 24px !important;
        word-wrap: break-word !important;
    }
    
    .page-header p {
        font-size: 14px !important;
        word-wrap: break-word !important;
    }
    
    /* Fix messages page mobile */
    .messages-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 16px auto !important;
        padding: 0 16px !important;
        height: calc(100vh - 140px) !important;
    }
    
    .conversations-sidebar {
        display: none !important;
    }
    
    .messages-container > div {
        grid-template-columns: 1fr !important;
    }
    
    /* Fix search page mobile */
    .search-results {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .search-tabs {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .search-tabs .tab {
        width: 100% !important;
        text-align: center !important;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    background: white;
    outline: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--ahiler-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.field-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.modal-overlay.show .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-content {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

/* Ad Items */
.ad-item {
    display: block;
    padding: 16px;
    border-radius: 8px;
    background: var(--gray-50);
    text-decoration: none;
    color: inherit;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.ad-item:hover {
    background: var(--gray-100);
    transform: translateY(-1px);
}

.ad-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.ad-subtitle {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.ad-image {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 16px;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(400px);
    animation: slideIn 0.3s ease-out forwards;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-info {
    border-left: 4px solid var(--ahiler-red);
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.toast-content i {
    font-size: 16px;
}

.toast-success .toast-content i {
    color: #10b981;
}

.toast-error .toast-content i {
    color: #ef4444;
}

.toast-info .toast-content i {
    color: var(--ahiler-red);
}

.toast-warning .toast-content i {
    color: #f59e0b;
}

.toast-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

/* Story Toast Styles */
.story-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 14px;
    z-index: 9999;
    animation: storySlideUp 0.3s ease-out forwards;
}

.story-toast.fade-out {
    animation: storySlideDown 0.3s ease-out forwards;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

@keyframes storySlideUp {
    from {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes storySlideDown {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(100px);
        opacity: 0;
    }
}

/* Authentication Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, var(--ahiler-red-bg) 0%, #fee2e2 100%);
}

.auth-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-logo {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--ahiler-red) 0%, var(--ahiler-red-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 28px;
    margin: 0 auto 16px;
}

.auth-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 8px;
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: 16px;
    margin: 0;
}

.auth-form {
    text-align: left;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form .form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.auth-form .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.auth-form .form-input:focus {
    border-color: var(--ahiler-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

.auth-submit {
    width: 100%;
    padding: 14px 16px;
    background: var(--ahiler-red);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.auth-submit:hover {
    background: var(--ahiler-red-dark);
    transform: translateY(-1px);
}

.auth-links {
    margin-top: 24px;
    text-align: center;
}

.auth-links a {
    color: var(--ahiler-red);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-divider {
    margin: 24px 0;
    text-align: center;
    position: relative;
    color: var(--gray-500);
    font-size: 14px;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gray-200);
    z-index: 1;
}

.auth-divider span {
    background: white;
    padding: 0 16px;
    position: relative;
    z-index: 2;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

/* Story Modal Styles */
.story-modal {
    max-width: 600px;
    width: 90%;
}

.story-preview {
    width: 100%;
    height: 300px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.story-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: #6366f1;
    color: #ffffff;
    font-family: Arial, sans-serif;
    font-size: 24px;
    line-height: 1.4;
}

.char-count {
    text-align: right;
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

#fontSizeValue {
    display: inline-block;
    margin-left: 8px;
    font-size: 12px;
    color: var(--gray-600);
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}