/* Mobil zoom engelleme */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    margin: 0;
    padding: 0;
}

body:has(.auth-container) {
    overflow: hidden;
    height: 100vh;
}

html {
    margin: 0;
    padding: 0;
    height: 100%;
}

input,
textarea,
select {
    -webkit-user-select: text;
    user-select: text;
    font-size: 16px !important;
    /* iOS zoom engelleme */
}

/* Header stilleri - DOM'dan kaldırıldığında gereksiz */

/* Video call specific styles */
.video-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
    margin-top: 0;
}

#remoteVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #1a1a1a;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.5);
}

.placeholder-content i {
    font-size: 80px;
    opacity: 0.5;
}

.placeholder-content span {
    font-size: 18px;
    font-weight: 500;
}

.media-notification {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-size: 14px;
    z-index: 25;
    animation: slideDown 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.media-notification.warning {
    background: rgba(255, 193, 7, 0.2);
    border-color: rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

.media-notification.info {
    background: rgba(13, 110, 253, 0.2);
    border-color: rgba(13, 110, 253, 0.4);
    color: #0d6efd;
}

.media-notification i {
    font-size: 18px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.local-video-container {
    position: absolute;
    top: 67px;
    right: 10px;
    width: 120px;
    height: 176px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
    background-color: #000;
    overflow: hidden;
}

#localVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.local-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
}

.local-video-overlay i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.6);
}

.call-info-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    z-index: 15;
    display: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.call-info-overlay.active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.call-info-item {
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
}

.call-info-item i {
    font-size: 18px;
    opacity: 0.9;
}

.call-timer {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

.controls-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    padding: 30px;
    padding-bottom: max(30px, env(safe-area-inset-bottom));
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.media-status-indicators {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.status-indicator {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1f1f1f;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    max-width: fit-content;
    margin: 0 auto;
}

.status-indicator i {
    font-size: 16px;
    color: #666;
}

.status-indicator span {
    color: #1f1f1f;
}

.control-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-control {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.btn-control:hover {
    transform: scale(1.1);
}

.btn-end-call {
    background: #ff3b30;
    color: white;
}

.btn-end-call:hover {
    background: #ff2d20;
}

.btn-toggle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-toggle.active {
    background: white;
    color: #667eea;
}

.btn-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.connection-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 30;
    padding: 40px;
}

.connection-panel.hidden {
    display: none;
}

.simple-panel {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.my-email-section {
    width: 100%;
    text-align: center;
}

.email-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-bottom: 10px;
    font-weight: 500;
}

.email-value {
    color: white;
    font-size: 18px;
    font-weight: 600;
    word-break: break-all;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.email-value:hover {
    background: rgba(255, 255, 255, 0.1);
}

.input-section {
    width: 100%;
}

.simple-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.simple-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.simple-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.call-button-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.btn-call-round {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #4CAF50;
    border: none;
    color: white;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.btn-call-round:hover {
    background: #45a049;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.6);
}

.btn-call-round:active {
    transform: scale(0.95);
}

/* Video call panel form controls */
.video-container .form-control,
.connection-panel .form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 10px;
    padding: 12px 15px;
}

.video-container .form-control::placeholder,
.connection-panel .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.video-container .form-control:focus,
.connection-panel .form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    color: white;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Eski btn-primary stilleri kaldırıldı - artık btn-call-round kullanılıyor */

.status-message {
    margin-top: 25px;
    padding: 15px 20px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.info {
    background: rgba(52, 152, 219, 0.3);
}

.status-message.success {
    background: rgba(46, 204, 113, 0.3);
}

.status-message.error {
    background: rgba(231, 76, 60, 0.3);
}

@media (max-width: 768px) {
    .video-container {
        height: 100vh;
        position: relative;
    }

    .local-video-container {
        width: 100px;
        height: 140px;
        top: 67px;
        right: 10px;
    }

    .local-video-overlay i {
        font-size: 36px;
    }

    .call-info-overlay {
        padding: 15px 20px;
        padding-top: max(15px, calc(15px + env(safe-area-inset-top)));
    }

    .call-info-item {
        font-size: 14px;
    }

    .call-timer {
        font-size: 16px;
    }

    .controls-overlay {
        position: fixed;
        bottom: 0;
        padding: 20px 15px;
        padding-bottom: max(20px, calc(15px + env(safe-area-inset-bottom)));
        gap: 12px;
    }

    .media-status-indicators {
        gap: 6px;
        max-width: 100%;
    }

    .status-indicator {
        padding: 6px 14px;
        font-size: 12px;
        border-radius: 18px;
    }

    .status-indicator i {
        font-size: 14px;
    }

    .status-indicator span {
        font-size: 12px;
    }

    .status-indicator {
        padding: 6px 14px;
        font-size: 12px;
        border-radius: 18px;
    }

    .status-indicator i {
        font-size: 14px;
    }

    .status-indicator span {
        font-size: 12px;
    }

    .btn-control {
        width: 56px;
        height: 56px;
        font-size: 22px;
        flex-shrink: 0;
    }

    .control-buttons {
        gap: 20px;
        padding: 0;
    }

    .simple-panel {
        max-width: 90%;
        gap: 25px;
    }

    .connection-panel {
        padding: 20px 15px;
        padding-top: max(20px, calc(20px + env(safe-area-inset-top)));
        padding-bottom: max(20px, calc(20px + env(safe-area-inset-bottom)));
    }

    .email-value {
        font-size: 16px;
    }

    .simple-input {
        padding: 14px 18px;
        font-size: 16px !important;
    }

    .btn-call-round {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .btn-control {
        width: 52px;
        height: 52px;
        font-size: 20px;
    }

    .control-buttons {
        gap: 15px;
    }

    .panel-content {
        padding: 25px 15px;
    }

    .my-id-display .id-value {
        font-size: 14px;
    }
}

/* Login/Register page styles - Dark Mode */
.auth-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background: #0a0a0a;
    overflow: hidden;
    box-sizing: border-box;
    margin: 0;
}

/* Header dark mode for auth pages */
body:has(.auth-container) #mainHeader nav {
    background-color: #0a0a0a !important;
    border-bottom: 1px solid #2a2a2a !important;
}

/* Auth sayfalarında header yüksekliğini sabit tut */
body:has(.auth-container) #mainHeader {
    position: fixed !important;
    height: 56px;
    min-height: 56px;
    overflow: visible;
}

body:has(.auth-container) #mainHeader .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #0a0a0a;
    border-top: 1px solid #2a2a2a;
    z-index: 1000;
    padding: 10px 0;
}

body:has(.auth-container) #mainHeader .navbar-nav {
    flex-direction: column;
    width: 100%;
}

body:has(.auth-container) #mainHeader .nav-item {
    width: 100%;
}

body:has(.auth-container) #mainHeader .nav-link {
    color: #fff !important;
    padding: 12px 20px;
    display: block;
    width: 100%;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s ease;
}

body:has(.auth-container) #mainHeader .nav-link:hover {
    background-color: #1a1a1a;
    color: #fff !important;
}

body:has(.auth-container) #mainHeader .nav-link:last-child {
    border-bottom: none;
}

body:has(.auth-container) #mainHeader .btn-link.nav-link {
    color: #fff !important;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    padding: 12px 20px;
}

body:has(.auth-container) #mainHeader .btn-link.nav-link:hover {
    background-color: #1a1a1a;
}

.auth-card {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 25px 30px;
    width: 100%;
    max-width: 380px;
    border: 1px solid #2a2a2a;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.auth-icon {
    width: 60px;
    height: 60px;
    background: #2a2a2a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.auth-icon i {
    font-size: 28px;
    color: #fff;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 5px;
}

.auth-header p {
    color: #888;
    font-size: 13px;
    margin: 0;
}

.auth-form {
    margin-bottom: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.form-group {
    margin-bottom: 14px;
    flex-shrink: 0;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 13px;
    color: #ccc;
    margin-bottom: 6px;
}

.form-label i {
    color: #888;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    font-size: 14px;
    background-color: #0f0f0f;
    color: #fff !important;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #4a4a4a;
    background-color: #0f0f0f;
    color: #fff !important;
}

.form-control:-webkit-autofill,
.form-control:-webkit-autofill:hover,
.form-control:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0px 1000px #0f0f0f inset !important;
    box-shadow: 0 0 0px 1000px #0f0f0f inset !important;
}

.form-control::placeholder {
    color: #555;
}

.form-group-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    flex-shrink: 0;
}

.form-check-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #4CAF50;
}

.form-check-label {
    font-size: 13px;
    color: #ccc;
    cursor: pointer;
    user-select: none;
}

.btn-auth-submit {
    width: 100%;
    padding: 12px;
    background: #4CAF50;
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.btn-auth-submit:hover {
    background: #45a049;
}

.btn-auth-submit i {
    font-size: 16px;
}

.auth-footer {
    text-align: center;
    padding-top: 12px;
    border-top: 1px solid #2a2a2a;
    flex-shrink: 0;
    margin-top: auto;
    margin-bottom: 0;
}

.auth-footer p {
    margin: 0;
    color: #888;
    font-size: 13px;
}

.auth-footer a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    color: #45a049;
    text-decoration: underline;
}

.validation-summary {
    background: #2a1a0a;
    border: 1px solid #4a3a2a;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    color: #ffa500;
    font-size: 13px;
}

.text-danger {
    font-size: 12px;
    color: #ff5555;
    margin-top: 4px;
    display: block;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 15px;
        height: 100vh;
    }

    .auth-card {
        padding: 25px 25px;
        max-width: 100%;
        max-height: calc(100vh - 90px);
    }

    .auth-icon {
        width: 55px;
        height: 55px;
    }

    .auth-icon i {
        font-size: 26px;
    }

    .auth-header h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
        height: 100vh;
        margin: 0;
    }

    .auth-card {
        padding: 20px 18px;
        max-height: calc(100vh - 80px);
        margin: 0;
    }

    .auth-header {
        margin-bottom: 18px;
    }

    .auth-header h1 {
        font-size: 20px;
    }

    .auth-icon {
        width: 50px;
        height: 50px;
    }

    .auth-icon i {
        font-size: 24px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn-auth-submit {
        padding: 11px;
        font-size: 14px;
    }
}