/* LivePage.css - Avatar ve Kategori Destekli Güncellenmiş Sürüm */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #0a0a0f;
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.header {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* DÜZELTME: Yeni düz layout - her element main-container'ın direkt çocuğu */
.main-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 1fr 320px; /* Content | Chat */
    grid-template-rows: auto auto auto auto; /* Video, Info, Donations, Widget */
    gap: 1.5rem;
    min-height: calc(100vh - 80px);
}

/* PC'de video ve diğer content sol tarafta, chat sağda */
.video-container {
    grid-column: 1;
    grid-row: 1;
}

.stream-info {
    grid-column: 1;
    grid-row: 2;
}

.donations-panel {
    grid-column: 1;
    grid-row: 3;
}

.donation-widget {
    grid-column: 1;
    grid-row: 4;
}

.chat-section {
    grid-column: 2;
    grid-row: 1 / 5; /* Chat tüm satırları kaplar */
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
}

/* Video Player */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    aspect-ratio: 16/9;
}

.video-player {
    width: 100%;
    height: 100%;
    object-fit: contain;
    -webkit-playsinline: true;
    playsinline: true;
}

/* Video Overlays */
.video-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 3;
}

.live-badge {
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(255, 71, 87, 0.4);
}

.viewer-count {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Custom Controls */
.custom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-container:hover .custom-controls {
    opacity: 1;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.control-btn {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.volume-slider {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.quality-selector {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Stream Info */
.stream-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
}

.stream-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    word-wrap: break-word;
    line-height: 1.4;
}

.stream-streamer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* DÜZELTME: Gerçek avatar desteği */
.streamer-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.streamer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.streamer-avatar .avatar-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
}

.streamer-info h3 {
    color: #667eea;
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.streamer-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* DÜZELTME: YouTube tarzı açıklama */
.stream-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    position: relative;
}

.stream-description.collapsed {
    max-height: 3.2em;
    overflow: hidden;
}

.stream-description.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.6em;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.05));
    pointer-events: none;
}

.description-toggle {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    padding: 0;
    transition: color 0.3s ease;
}

.description-toggle:hover {
    color: #764ba2;
}

.stream-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* YENİ: Kategori stat item özel stili */
.stat-item.category-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.category-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.category-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-item .number {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.stat-item .label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    box-shadow: 0 8px 25px rgba(81, 207, 102, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(81, 207, 102, 0.4);
}

/* DÜZELTME: Chat Section - Tam sağ tarafta */
.chat-section {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    max-height: calc(100vh - 120px);
}

/* Chat Container - Tam yükseklik */
.chat-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chat-header h3 {
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.chat-online {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    text-align: right;
}

/* Chat Moderation Panel */
.chat-moderation {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    display: none;
    flex-shrink: 0;
}

.chat-moderation.show {
    display: block;
}

.selected-user-info {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.selected-user-info.show {
    display: block;
}

.mod-tools {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mod-btn {
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.mod-btn.timeout {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.mod-btn.ban {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.mod-btn:hover {
    transform: translateY(-1px);
    opacity: 0.8;
}

/* Pinned Message */
.pinned-message {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.2);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none;
    flex-shrink: 0;
}

.pinned-message.show {
    display: block;
}

.pinned-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffc107;
    font-size: 0.9rem;
}

/* Chat Messages - Avatar desteği eklendi */
.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    min-height: 0;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.chat-message {
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s ease;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-message:hover {
    background: rgba(255, 255, 255, 0.05);
}

.chat-message.selected {
    background: rgba(102, 126, 234, 0.2);
    border: 1px solid rgba(102, 126, 234, 0.4);
}

.chat-message.system {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    font-style: italic;
}

.chat-message.deleted {
    opacity: 0.5;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
}

/* YENİ: Chat message layout with avatar */
.chat-message-content {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
}

.chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.chat-avatar-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.chat-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.chat-user {
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chat-user.owner {
    color: #ff6b6b;
}

.chat-user.moderator {
    color: #51cf66;
}

.chat-user.admin {
    color: #ffd43b;
}

.chat-user.normal {
    color: #667eea;
}

.user-badges {
    display: flex;
    gap: 0.25rem;
}

.user-badge {
    width: 14px;
    height: 14px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.chat-text .chat-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.chat-text .chat-link:hover {
    text-decoration: underline;
}

.chat-text .unsafe-link {
    color: #ff9800;
    font-weight: 600;
}

.chat-time {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Chat Input - Mini Donation desteği eklendi */
.chat-input {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
    position: relative;
}

.chat-input-container {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chat-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.chat-input input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* YENİ: Chat input actions container */
.chat-input-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* YENİ: Mini donation button */
.mini-donation-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
    border: none;
    color: white;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.mini-donation-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.mini-donation-btn.active {
    background: linear-gradient(135deg, #ff8a80, #ff5722);
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.5);
}

.chat-send-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    min-width: 45px;
}

.chat-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* YENİ: Mini Donation Modal */
.mini-donation-modal {
    position: absolute;
    bottom: 100%;
    right: 0;
    width: 300px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.mini-donation-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mini-donation-content {
    padding: 1rem;
}

.mini-donation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mini-donation-header span {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.close-mini-donation {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-mini-donation:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.mini-quick-amounts {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.mini-amount-btn {
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    text-align: center;
}

.mini-amount-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.mini-amount-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: #667eea;
    transform: scale(1.05);
}

.mini-custom-amount {
    margin-bottom: 0.75rem;
}

.mini-custom-amount input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.mini-custom-amount input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.mini-custom-amount input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.mini-message {
    margin-bottom: 0.75rem;
}

.mini-message input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.mini-message input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.mini-message input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.mini-donation-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mini-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.mini-checkbox input[type="checkbox"] {
    margin: 0;
}

.mini-send-btn {
    background: linear-gradient(135deg, #51cf66, #40c057);
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.mini-send-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(81, 207, 102, 0.3);
}

.mini-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mini-balance {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

/* DÜZELTME: Gelişmiş Bağış Paneli - Avatar desteği */
.donations-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.1rem;
    min-height: 300px;
}

.donations-header {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.donations-count {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.donations-refresh {
    background: rgba(102, 126, 234, 0.2);
    border: none;
    color: #667eea;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.donations-refresh:hover {
    background: rgba(102, 126, 234, 0.3);
}

.donations-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 2rem 1rem;
    font-style: italic;
}

.donations-empty .icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    display: block;
}

.donations-empty .message {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.donations-empty .submessage {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* DÜZELTME: Donation item with avatar support */
.donation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.donation-item.new {
    animation: slideInDonation 0.6s ease;
    background: rgba(81, 207, 102, 0.15);
    border: 1px solid rgba(81, 207, 102, 0.4);
    box-shadow: 0 4px 20px rgba(81, 207, 102, 0.2);
}

@keyframes slideInDonation {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.donation-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 600;
}

.donation-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.donation-avatar-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.donation-info {
    flex: 1;
    min-width: 0;
}

.donation-user {
    font-weight: 600;
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.donation-message {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    line-height: 1.4;
    word-wrap: break-word;
    margin-bottom: 0.25rem;
}

.donation-time {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

.donation-amount {
    font-weight: 700;
    color: #51cf66;
    font-size: 1rem;
    flex-shrink: 0;
    text-align: right;
    align-self: center;
}

/* DÜZELTME: Donation Widget Styles - Layout problemini çözer */
.donation-widget {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    contain: layout style;
}

.donation-widget .card-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.donation-widget .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: inherit;
    line-height: 1.4;
}

/* DÜZELTME: Textarea özel stilleri - ekran büyüme problemini çözer */
.form-textarea {
    resize: none !important;
    min-height: 80px;
    max-height: 120px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.form-textarea::-webkit-scrollbar {
    width: 4px;
}

.form-textarea::-webkit-scrollbar-track {
    background: transparent;
}

.form-textarea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.quick-amounts {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.amount-btn {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
    flex: 1;
}

.amount-btn:hover {
    background: rgba(102, 126, 234, 0.3);
    border-color: #667eea;
}

.donation-footer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.user-balance {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* DÜZELTME: Karakter sayacı stili */
.char-counter {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.7rem;
    margin-top: 0.25rem;
    display: block;
}

.char-counter.warning {
    color: #ffa726;
}

.char-counter.danger {
    color: #ff6b6b;
}

/* Loading & Error States */
.loading-overlay,
.error-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
    z-index: 5;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.chat-message {
    animation: slideIn 0.3s ease;
}

/* DÜZELTME: Gelişmiş Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
    border-left: 4px solid rgba(255,255,255,0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.error {
    background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.notification.warning {
    background: linear-gradient(135deg, #ffa726, #ff9800);
}

.notification.info {
    background: linear-gradient(135deg, #42a5f5, #2196f3);
}

/* ========== MOBİL DÜZELTMELERİ ========== */

/* Mobil fullscreen düzeltmesi */
.mobile-fullscreen-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-fullscreen-btn:hover {
    background: rgba(102, 126, 234, 0.8);
    transform: scale(1.1);
}

/* DÜZELTME: Mobil responsive tasarım - 2 sütun layout */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 1fr 280px;
        max-width: 1400px;
    }
}

@media (max-width: 968px) {
    body {
        overflow-x: hidden;
    }
    
    .header {
        padding: 0.5rem 0;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    /* MOBİLDE: Basit flexbox sıralama - video üst, chat hemen alt */
    .main-container {
        display: flex;
        flex-direction: column;
        padding: 0;
        gap: 0;
        max-width: 100%;
        grid-template-columns: none;
        grid-template-rows: none;
    }
    
    /* Mobilde order sistemi */
    .video-container {
        order: 1;
    }
    
    .chat-section {
        order: 2;
        position: static;
        height: auto;
        max-height: none;
    }
    
    .stream-info {
        order: 3;
    }
    
    .donations-panel {
        order: 4;
    }
    
    .donation-widget {
        order: 5;
    }
    
    /* Video container - mobil optimizasyon */
    .video-container {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        border-radius: 0;
        aspect-ratio: 16/9;
        max-height: 250px;
        position: relative;
    }
    
    .video-player {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .video-player::-webkit-media-controls-fullscreen-button {
        display: none !important;
    }
    
    .video-player::-webkit-media-controls {
        display: none !important;
    }
    
    /* Video overlays - mobil */
    .video-overlay {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
    }
    
    .live-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .viewer-count {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Custom controls - mobil */
    .custom-controls {
        opacity: 1;
        padding: 1rem 0.75rem 0.75rem;
        background: linear-gradient(transparent 0%, rgba(0, 0, 0, 0.7) 50%, rgba(0, 0, 0, 0.9) 100%);
    }
    
    .controls-left,
    .controls-right {
        gap: 0.5rem;
    }
    
    .control-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        padding: 0.5rem;
        font-size: 0.9rem;
    }
    
    .volume-container {
        gap: 0.5rem;
    }
    
    .volume-slider {
        width: 60px;
    }
    
    .quality-selector {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* Stream info - mobil */
    .stream-info {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 12px;
    }
    
    .stream-title {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }
    
    .stream-streamer {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
    
    .streamer-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .streamer-info h3 {
        font-size: 1.1rem;
    }
    
    .stream-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .stream-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem;
    }
    
    .stat-item .number {
        font-size: 1.25rem;
    }
    
    .stat-item .label {
        font-size: 0.75rem;
    }
    
    .action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    /* Chat section - mobil tam genişlik, video'nun hemen altında */
    .chat-section {
        position: static;
        height: auto;
        max-height: none;
        margin: 0;
    }
    
    /* Chat container - mobil */
    .chat-container {
        height: 400px;
        border-radius: 0;
        margin: 0;
    }
    
    .chat-header {
        padding: 0.75rem 1rem;
    }
    
    .chat-messages {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .chat-message {
        padding: 0.5rem;
    }
    
    /* Chat message mobil avatar düzeltmeleri */
    .chat-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .chat-input {
        padding: 0.75rem 1rem;
    }
    
    /* Mini donation modal mobil düzeltmeleri */
    .mini-donation-modal {
        width: 280px;
        right: 0.5rem;
    }
    
    .mini-donation-content {
        padding: 0.75rem;
    }
    
    .mini-quick-amounts {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }
    
    .mini-amount-btn {
        padding: 0.4rem;
        font-size: 0.7rem;
    }
    
    /* Donations panel - mobil */
    .donations-panel {
        margin: 1rem;
        padding: 1rem;
    }
    
    .donation-item {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
        gap: 0.5rem;
    }
    
    .donation-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
    
    /* Donation widget - mobil */
    .donation-widget {
        margin: 1rem;
        padding: 1rem;
    }
    
    .donation-widget .card-title {
        font-size: 1rem;
    }
    
    .quick-amounts {
        gap: 0.4rem;
    }
    
    .amount-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        flex: 1;
        text-align: center;
        min-width: 0;
    }
    
    .donation-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .user-balance {
        justify-content: center;
        font-size: 0.85rem;
    }
    
    /* Mobil fullscreen buton */
    .mobile-fullscreen-btn {
        display: block;
    }
    
    /* Notification - mobil */
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}

/* Küçük telefon ekranları */
@media (max-width: 480px) {
    .header-container {
        padding: 0 0.75rem;
    }
    
    .logo {
        font-size: 1.1rem;
    }
    
    .video-container {
        max-height: 220px;
    }
    
    .stream-info {
        margin: 0.75rem;
        padding: 1rem;
    }
    
    .stream-title {
        font-size: 1.1rem;
    }
    
    .stream-stats {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-item .number {
        font-size: 1rem;
    }
    
    .chat-container {
        margin: 0;
        height: 350px;
    }
    
    .chat-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    
    .donations-panel,
    .donation-widget {
        margin: 0 0.75rem;
        padding: 0.75rem;
    }
    
    .donation-user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .amount-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .mini-donation-modal {
        width: 250px;
    }
    
    .mini-quick-amounts {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .mini-amount-btn {
        padding: 0.3rem;
        font-size: 0.65rem;
    }
}

@media (max-width: 968px) and (orientation: landscape) {
    .video-container {
        height: 70vh;
        max-height: none;
    }
    
    .main-container {
        padding-bottom: 1rem;
    }
}
 
@media (max-width: 768px) {
    .form-textarea {
        min-height: 60px;
        max-height: 100px;
        font-size: 16px; /* iOS'ta zoom'u önler */
        -webkit-appearance: none;
        transform: none !important;
    }
    
    .form-input {
        font-size: 16px; /* iOS'ta zoom'u önler */
    }
    
    .chat-input input {
        font-size: 16px; /* iOS'ta zoom'u önler */
    }
    
    .mini-custom-amount input,
    .mini-message input {
        font-size: 16px; /* iOS'ta zoom'u önler */
    }
}

/* Safari mobil düzeltmeleri */
@supports (-webkit-touch-callout: none) {
    .video-container {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .video-player {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        /* iOS Safari video fullscreen düzeltmeleri */
        -webkit-playsinline: true;
        -webkit-presentation-mode: inline;
    }
    
    .form-textarea,
    .form-input,
    .chat-input input,
    .mini-custom-amount input,
    .mini-message input {
        -webkit-appearance: none;
        border-radius: 10px;
    }
}