* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;

    background: #0d1017;
    color: #ffffff;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.screen {
    width: 100%;
    min-height: 100vh;
}


/* PREJOIN */

#prejoin {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px 20px;
}

.prejoin-card {
    width: 100%;
    max-width: 720px;

    background: #171b24;

    border: 1px solid rgba(255,255,255,.08);

    border-radius: 22px;

    padding: 28px;

    box-shadow:
        0 20px 60px rgba(0,0,0,.35);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 24px;
}

.brand-icon {
    width: 48px;
    height: 48px;

    border-radius: 14px;

    background: #ffffff;
    color: #111;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    font-weight: 700;
}

.brand-name {
    font-size: 21px;
    font-weight: 700;
}

.brand-subtitle {
    margin-top: 3px;
    color: #9098a8;
    font-size: 14px;
}

.preview-wrapper {
    position: relative;

    width: 100%;
    aspect-ratio: 16 / 9;

    background: #080a0f;

    border-radius: 18px;

    overflow: hidden;
}

#preview-video {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transform: scaleX(-1);
}

.preview-placeholder {
    position: absolute;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    color: #858b98;
}

.device-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;

    margin-top: 18px;
}

.circle-button,
.control-button {
    border: 0;

    width: 52px;
    height: 52px;

    border-radius: 50%;

    background: #343946;
    color: #ffffff;

    font-size: 20px;
}

.circle-button.active,
.control-button.active {
    background: #343946;
}

.circle-button.off,
.control-button.off {
    background: #b53b45;
}

.join-form {
    margin-top: 24px;
}

.join-form label {
    display: block;

    margin-bottom: 8px;

    font-size: 14px;

    color: #b8beca;
}

.join-form input {
    width: 100%;

    padding: 15px 16px;

    border: 1px solid #353b49;
    outline: none;

    border-radius: 12px;

    background: #10131a;
    color: white;
}

.join-form input:focus {
    border-color: #777f91;
}

.primary-button {
    width: 100%;

    margin-top: 18px;

    border: 0;
    border-radius: 12px;

    padding: 15px 18px;

    background: #ffffff;
    color: #121212;

    font-weight: 700;
}

.primary-button:disabled {
    opacity: .5;
    cursor: wait;
}

.room-info {
    margin-top: 10px;

    color: #7f8797;
    font-size: 13px;
}

.error-message {
    min-height: 22px;

    margin-top: 12px;

    color: #ff727d;
    font-size: 14px;
}


/* MEETING */

#meeting {
    height: 100vh;

    display: grid;

    grid-template-rows:
        64px
        minmax(0, 1fr)
        88px;

    background: #090b10;
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 24px;

    border-bottom:
        1px solid rgba(255,255,255,.06);

    background: #11141b;
}

.room-label {
    font-size: 13px;
    color: #7d8492;
}

.video-grid {
    min-height: 0;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 12px;

    padding: 12px;
}

.participant {
    position: relative;

    min-height: 0;

    overflow: hidden;

    border-radius: 18px;

    background: #171a20;
}

.participant video {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.participant.local video {
    transform: scaleX(-1);
}

.participant-name {
    position: absolute;

    left: 14px;
    bottom: 14px;

    padding: 7px 10px;

    border-radius: 8px;

    background: rgba(0,0,0,.55);

    font-size: 13px;
}

.participant-placeholder {
    position: absolute;
    inset: 0;

    display: flex;

    justify-content: center;
    align-items: center;

    font-size: 42px;

    color: #777e8b;
}

.meeting-controls {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 14px;

    background: #11141b;

    border-top:
        1px solid rgba(255,255,255,.06);
}

.control-button {
    width: 56px;
    height: 56px;
}

.control-button.leave {
    background: #d94752;

    transform: rotate(135deg);
}


/* MOBILE */

@media (max-width: 750px) {

    .prejoin-card {
        padding: 18px;
    }

    .video-grid {
        grid-template-columns: 1fr;

        grid-template-rows:
            repeat(2, minmax(0, 1fr));
    }

    .meeting-header {
        padding: 0 14px;
    }
}

/* BUTON IKON HIZALAMA */

.circle-button,
.control-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    line-height: 1;

    flex-shrink: 0;
}

.circle-button svg,
.control-button svg {
    width: 23px;
    height: 23px;

    display: block;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.control-button.leave {
    transform: none;
}

.control-button.leave svg {
    width: 25px;
    height: 25px;
}

@media (max-width: 750px) {

    .meeting-controls {
        gap: 18px;
        padding: 14px 0;
    }

    .control-button {
        width: 58px;
        height: 58px;
    }

}

.meeting-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.control-button {
    width: 52px;
    height: 52px;

    border: 0;
    border-radius: 50%;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    cursor: pointer;

    background: rgba(255,255,255,0.12);
    color: #fff;

    transition:
        transform .15s ease,
        background .15s ease,
        opacity .15s ease;
}

.control-button:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.20);
}

.control-button:active {
    transform: scale(.95);
}

.control-button .icon {
    width: 23px;
    height: 23px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;
}

.control-button .icon-off {
    display: none;
}

.control-button.off .icon-on {
    display: none;
}

.control-button.off .icon-off {
    display: block;
}

.control-button.off {
    background: rgba(255,255,255,0.92);
    color: #222;
}

.control-button.disabled,
.control-button:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.control-button.leave-button {
    background: #e5484d;
    color: #fff;
}

.control-button.leave-button:hover {
    background: #d93d42;
}

@media (max-width: 600px) {

    .meeting-controls {
        gap: 10px;
    }

    .control-button {
        width: 50px;
        height: 50px;
    }

    .control-button .icon {
        width: 22px;
        height: 22px;
    }
}
.participant-placeholder {
    display: none !important;
}

.participant {
    position: relative;
}

.participant-media-status {
    position: absolute;
    right: 12px;
    top: 12px;

    display: flex;
    align-items: center;
    gap: 6px;

    z-index: 20;
}

.media-status-icon {
    width: 32px;
    height: 32px;

    display: none;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(20, 20, 20, 0.75);
    color: #fff;

    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.media-status-icon.visible {
    display: flex;
}

.media-status-icon svg {
    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 600px) {

    .participant-media-status {
        right: 8px;
        top: 8px;
    }

    .media-status-icon {
        width: 29px;
        height: 29px;
    }

    .media-status-icon svg {
        width: 15px;
        height: 15px;
    }
}

.preview-control .icon {
    width: 22px;
    height: 22px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.preview-control .icon-off {
    display: none;
}

.preview-control.off .icon-on {
    display: none;
}

.preview-control.off .icon-off {
    display: block;
}

/* =========================================================
   NAC VIDEO - STABIL KAMERA / KONTROL SON DÜZELTMELERİ
   ========================================================= */

.control-button.hangup,
.control-button.leave-button {
    background: #ef4444;
    color: #fff;
}

.control-button.leave-button .hangup-icon {
    width: 26px;
    height: 26px;
    fill: currentColor;
    stroke: none;
}

.control-button.leave-button:hover {
    background: #dc2626;
}

.control-button:disabled {
    opacity: .38;
    cursor: not-allowed;
    transform: none;
}
/* =====================================================
   PARTICIPANT KAMERA / MIKROFON DURUMU
   ===================================================== */

.participant-media-status {
    position: absolute;

    top: 12px;
    right: 12px;

    z-index: 25;

    display: flex;
    align-items: center;
    gap: 7px;
}


.media-status-icon {
    display: none;

    width: 32px;
    height: 32px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(18, 20, 26, .78);

    color: #ffffff;

    backdrop-filter:
        blur(7px);

    -webkit-backdrop-filter:
        blur(7px);
}


.media-status-icon.visible {
    display: flex;
}


.media-status-icon svg {
    width: 17px;
    height: 17px;

    fill: none;

    stroke:
        currentColor;

    stroke-width: 2;

    stroke-linecap:
        round;

    stroke-linejoin:
        round;
}


@media (max-width: 600px) {

    .participant-media-status {
        top: 9px;
        right: 9px;
        gap: 5px;
    }

    .media-status-icon {
        width: 29px;
        height: 29px;
    }

    .media-status-icon svg {
        width: 15px;
        height: 15px;
    }
}