/* =========================================
   GENERAL PAGE
========================================= */

* {
    box-sizing: border-box;
}

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

body {
    background: #202020;
    font-family: Arial, Helvetica, sans-serif;
    color: white;

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

    min-height: 100vh;
}


/* =========================================
   PHONE
========================================= */

.page {
    width: 100%;
    min-height: 100vh;

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


.phone {
    position: relative;

    width: 390px;
    height: 844px;

    background: #111;

    border-radius: 42px;

    padding: 10px;

    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.7),
        inset 0 0 0 2px #444;

    overflow: hidden;
}


/* =========================================
   PHONE CAMERA
========================================= */

.phone-camera {
    position: absolute;

    top: 18px;
    left: 50%;

    transform: translateX(-50%);

    width: 90px;
    height: 25px;

    background: #050505;

    border-radius: 20px;

    z-index: 100;
}


/* =========================================
   SCREEN
========================================= */

.screen {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border-radius: 34px;

    background-color: #333;
}


/* =========================================
   LOCKSCREEN WALLPAPER
========================================= */

.lockscreen {
    background-image: url("images/lockscreen.jpg");

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;
}


/* =========================================
   HOMESCREEN WALLPAPER
========================================= */

.homescreen {
    background-image: url("images/homescreen.jpg");

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;
}

/* dark layer over wallpaper */

.screen::after {
    content: "";

    position: absolute;

    inset: 0;

    background: rgba(0, 0, 0, 0.12);

    pointer-events: none;

    z-index: 1;
}


/* =========================================
   STATUS BAR
========================================= */

.status-bar {
    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 45px;

    padding: 12px 18px;

    display: flex;

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

    font-size: 13px;

    z-index: 20;

    text-shadow: 0 1px 4px black;
}

.status-icons {
    display: flex;
    gap: 8px;
    align-items: center;
}


/* =========================================
   SCREEN PAGES
========================================= */

.screen-page {
    position: absolute;

    inset: 0;

    z-index: 5;

    overflow: hidden;
}

.hidden {
    display: none !important;
}


/* =========================================
   LOCKSCREEN
========================================= */

.lock-content {
    width: 100%;
    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding-top: 125px;
}

.lock-date {
    font-size: 17px;

    text-shadow: 0 2px 8px black;
}

.lock-time {
    font-size: 82px;

    font-weight: 300;

    line-height: 1;

    margin-top: 8px;

    text-shadow: 0 3px 10px black;
}


.lock-notification {
    width: 86%;

    margin-top: 100px;

    padding: 14px;

    display: flex;

    gap: 12px;

    align-items: center;

    background: rgba(40, 40, 40, 0.7);

    backdrop-filter: blur(15px);

    border-radius: 18px;
}

.notification-icon {
    width: 35px;
    height: 35px;

    display: flex;

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

    border-radius: 50%;

    background: #777;
}

.lock-notification p {
    margin: 4px 0 0;

    font-size: 13px;

    opacity: 0.8;
}


.unlock-button {
    margin-top: 25px;

    padding: 12px 25px;

    border: none;

    border-radius: 30px;

    background: rgba(255,255,255,0.2);

    color: white;

    cursor: pointer;

    backdrop-filter: blur(10px);
}

.unlock-button:hover {
    background: rgba(255,255,255,0.3);
}


/* =========================================
   PASSWORD
========================================= */

.password-content {
    width: 100%;
    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding-top: 115px;

    background: rgba(0,0,0,0.45);

    backdrop-filter: blur(15px);
}

.password-content h2 {
    font-weight: 400;
    margin-top: 30px;
}

.password-back {
    position: absolute;

    top: 65px;
    left: 20px;

    border: none;

    background: none;

    color: white;

    font-size: 28px;

    cursor: pointer;
}


.password-dots {
    display: flex;

    gap: 15px;

    margin: 25px 0;
}

.password-dots span {
    width: 12px;
    height: 12px;

    border-radius: 50%;

    border: 1px solid white;
}

.password-dots span.filled {
    background: white;
}

#password-error {
    height: 20px;

    color: #ffb4b4;

    font-size: 13px;
}


.keypad {
    width: 260px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 15px;

    margin-top: 10px;
}

.keypad button {
    width: 70px;
    height: 70px;

    margin: auto;

    border-radius: 50%;

    border: none;

    background: rgba(255,255,255,0.15);

    color: white;

    font-size: 25px;

    cursor: pointer;

    backdrop-filter: blur(8px);
}

.keypad button:hover {
    background: rgba(255,255,255,0.3);
}

.empty-key {
    visibility: hidden;
}


/* =========================================
   HOME SCREEN
========================================= */

.home-content {
    width: 100%;
    height: 100%;

    padding: 80px 25px 80px;
}


/* =========================================
   WEATHER WIDGET
========================================= */

.weather-widget {
    width: 100%;

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    padding: 20px;

    margin-top: 20px;

    background: rgba(0,0,0,0.2);

    border-radius: 20px;

    backdrop-filter: blur(10px);

    text-shadow: 0 2px 6px black;
}

.weather-widget strong {
    display: block;

    font-size: 38px;

    font-weight: 300;
}

.weather-widget span {
    display: block;

    font-size: 13px;

    opacity: 0.8;
}

.weather-location {
    font-size: 13px;

    opacity: 0.8;
}


/* =========================================
   APP GRID
========================================= */

.app-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 28px 15px;

    margin-top: 45px;
}

.app {
    border: none;

    background: none;

    color: white;

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 7px;

    cursor: pointer;

    font-size: 12px;

    text-shadow: 0 2px 5px black;
}


.app-icon {
    width: 58px;
    height: 58px;

    border-radius: 17px;

    display: flex;

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

    font-size: 27px;

    background: #555;

    box-shadow:
        0 4px 10px rgba(0,0,0,0.35);
}


/* Individual app icons */

.gallery-icon {
    background: #e6a23c;
}

.messages-icon {
    background: #55a866;
}

.notes-icon {
    background: #e5d66a;
    color: #333;
}

.browser-icon {
    background: #628edb;
}

.search-icon {
    background: #777;
}

.camera-icon {
    background: #333;
}

/* Real image app icons */

.real-app-icon {
    width: 58px;
    height: 58px;
    display: block;
    object-fit: contain;
    border-radius: 17px;
}


/* =========================================
   APP HEADER
========================================= */

.app-screen {
    background: rgba(20,20,20,0.95);

    backdrop-filter: blur(20px);

    padding-top: 45px;
}

.app-header {
    height: 65px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 18px;

    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.app-header h2 {
    font-size: 19px;

    font-weight: 500;
}

.app-header button {
    border: none;

    background: none;

    color: white;

    font-size: 27px;

    cursor: pointer;
}

/* =========================================
   GALLERY
========================================= */

#gallery {
    display: flex;
    flex-direction: column;
}

.gallery-grid {
    display: grid;

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

    gap: 3px;

    padding: 3px;

    width: 100%;

    flex: 1;

    overflow-y: auto;

    overflow-x: hidden;

    box-sizing: border-box;

    align-content: start;
}

.gallery-photo {
    width: 100%;

    height: 145px;

    overflow: hidden;

    background: #333;

    cursor: pointer;
}

.gallery-photo img {
    width: 100%;

    height: 100%;

    display: block;

    object-fit: cover;
}

.gallery-photo:hover {
    opacity: 0.8;
}

/* =========================================
   PHOTO VIEWER
========================================= */

#photo-viewer {
    background: #000;

    display: flex;

    flex-direction: column;
}

.photo-viewer-header {
    height: 55px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 15px;

    box-sizing: border-box;

    color: white;

    background: rgba(0,0,0,0.9);

    font-size: 18px;
}

.photo-viewer-header button {
    border: none;

    background: none;

    color: white;

    font-size: 28px;

    cursor: pointer;

    padding: 0;
}

.photo-viewer-content {
    flex: 1;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    padding: 10px;

    box-sizing: border-box;
}

.photo-viewer-content img {
    max-width: 100%;

    max-height: 100%;

    width: auto;

    height: auto;

    object-fit: contain;

    display: block;
}

/* =========================================
   MESSAGES
========================================= */

.conversation {
    padding: 25px 15px;

    display: flex;

    flex-direction: column;

    gap: 10px;
}

.message {
    max-width: 75%;

    padding: 10px 14px;

    border-radius: 18px;

    font-size: 14px;

    line-height: 1.4;
}

.received {
    background: #333;

    align-self: flex-start;

    border-bottom-left-radius: 5px;
}

.sent {
    background: #555;

    align-self: flex-end;

    border-bottom-right-radius: 5px;
}


/* =========================================
   NOTES
========================================= */

.notes-list {
    padding: 10px;
}

.note {
    width: 100%;

    padding: 17px;

    border: none;

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

    background: none;

    color: white;

    text-align: left;

    cursor: pointer;
}

.note strong {
    display: block;

    font-size: 15px;

    margin-bottom: 5px;
}

.note span {
    font-size: 12px;

    opacity: 0.6;
}

.locked-note {
    color: #ccc;
}

/* =========================================
   NOTES APP
========================================= */

#notes {
    background: #f7f7f7;
    color: #222;
    display: flex;
    flex-direction: column;
}


/* Notes header */

.notes-header {
    height: 58px;

    flex-shrink: 0;

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

    padding: 0 15px;

    box-sizing: border-box;

    background: #ffffff;

    border-bottom: 1px solid #dddddd;
}


.notes-header h2 {
    margin: 0;

    font-size: 20px;

    font-weight: 600;
}


.notes-header button {
    border: none;

    background: none;

    font-size: 28px;

    color: #222;

    cursor: pointer;

    padding: 0;
}


.notes-header span {
    font-size: 24px;
}


/* Search bar */

.notes-search {
    margin: 12px;

    height: 42px;

    border-radius: 22px;

    background: #e9e9e9;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 0 15px;

    box-sizing: border-box;

    color: #777;

    font-size: 14px;
}


/* Notes list */

.notes-list {
    flex: 1;

    overflow-y: auto;

    padding: 6px 10px 20px;

    box-sizing: border-box;
}


/* Individual cards */

.note-card {
    background: #ffffff;

    border-radius: 10px;

    margin-bottom: 10px;

    padding: 14px;

    box-sizing: border-box;

    box-shadow:
        0 1px 4px rgba(0,0,0,0.12);

    cursor: pointer;
}


.note-card:active {
    transform: scale(0.98);

    background: #eeeeee;
}


.note-card h3 {
    margin: 0 0 7px;

    font-size: 16px;

    font-weight: 600;

    color: #222;
}


.note-card p {
    margin: 0 0 9px;

    font-size: 13px;

    color: #666;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.note-date {
    font-size: 11px;

    color: #999;
}


/* =========================================
   INDIVIDUAL NOTE
========================================= */

#note-reader {
    background: #ffffff;

    color: #222;

    display: flex;

    flex-direction: column;
}


/* Note reader header */

.note-reader-header {
    height: 58px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 15px;

    box-sizing: border-box;

    background: #ffffff;

    border-bottom: 1px solid #dddddd;
}


.note-reader-header button {
    border: none;

    background: none;

    font-size: 28px;

    color: #222;

    cursor: pointer;

    padding: 0;
}


.note-reader-header span {
    font-size: 18px;
}


/* Scrollable note */

.note-reader-content {
    flex: 1;

    overflow-y: auto;

    overflow-x: hidden;

    padding: 24px 20px 40px;

    box-sizing: border-box;
}


/* Individual note content */

.note-content {
    display: block;
}


.note-content h1 {
    margin: 0 0 6px;

    font-size: 25px;

    font-weight: 600;

    color: #222;
}


.note-full-date {
    margin: 0 0 28px;

    color: #999;

    font-size: 12px;
}


.note-content p {
    font-size: 16px;

    line-height: 1.7;

    color: #333;

    margin: 0 0 22px;
}

/* =========================================
   LOCKED NOTE
========================================= */

.locked-note-title {
    display: flex;

    align-items: center;

    gap: 8px;
}


.lock-symbol {
    font-size: 15px;
}


.locked-note-title h3 {
    margin: 0;
}


/* Password screen */

#locked-note-password {
    background: #ffffff;

    color: #222;

    display: flex;

    flex-direction: column;
}


.locked-note-header {
    height: 58px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 15px;

    box-sizing: border-box;

    background: #ffffff;

    border-bottom: 1px solid #dddddd;
}


.locked-note-header button {
    border: none;

    background: none;

    font-size: 28px;

    color: #222;

    cursor: pointer;

    padding: 0;
}


.locked-note-header span {
    font-size: 18px;
}


.locked-note-password-content {
    flex: 1;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding-top: 35px;

    box-sizing: border-box;

    overflow-y: auto;
}


.big-lock {
    font-size: 42px;

    margin-bottom: 12px;
}


.locked-note-password-content h1 {
    margin: 0 0 7px;

    font-size: 23px;

    font-weight: 600;
}


.locked-note-password-content > p {
    margin: 0;

    color: #777;

    font-size: 14px;
}


/* Password dots */

.password-dots {
    display: flex;

    gap: 12px;

    margin-top: 25px;

    margin-bottom: 25px;
}


.password-dots span {
    width: 11px;

    height: 11px;

    border-radius: 50%;

    border: 1px solid #555;

    box-sizing: border-box;
}


.password-dots span.filled {
    background: #222;
}


/* Error message */

.password-error {
    height: 18px;

    margin-bottom: 10px;

    font-size: 12px;

    color: #d33;

    opacity: 0;
}


.password-error.show {
    opacity: 1;
}


/* Keypad */

.password-keypad {
    width: 210px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

    margin-top: 5px;
}


.password-keypad button {
    width: 62px;

    height: 62px;

    border-radius: 50%;

    border: none;

    background: #eeeeee;

    color: #222;

    font-size: 21px;

    cursor: pointer;

    justify-self: center;
}


.password-keypad button:active {
    background: #d5d5d5;

    transform: scale(0.94);
}


.password-keypad .empty-key {
    visibility: hidden;
}


/* =========================================
   LOCKED NOTE READER
========================================= */

#locked-note-reader {
    background: #ffffff;

    color: #222;

    display: flex;

    flex-direction: column;
}


/* =========================================
   BROWSER
========================================= */

.browser-page {
    padding: 20px;
}

.address-bar {
    padding: 12px;

    background: #333;

    border-radius: 25px;

    font-size: 12px;

    color: #aaa;
}

.browser-page h1 {
    margin-top: 50px;

    text-align: center;

    font-weight: 300;
}


/* =========================================
   SEARCH HISTORY
========================================= */

.search-history {
    padding: 10px 20px;
}

.search-history div {
    padding: 15px 0;

    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.search-history span {
    font-size: 11px;

    opacity: 0.5;
}

.search-history p {
    margin: 5px 0;

    font-size: 14px;
}


/* =========================================
   CAMERA
========================================= */

.camera-screen {
    width: 100%;
    height: 100%;

    background: #111;

    position: relative;

    display: flex;

    justify-content: center;

    align-items: center;
}

.camera-view {
    width: 100%;
    height: 100%;

    display: flex;

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

    color: #555;
}

.camera-back {
    position: absolute;

    top: 60px;
    left: 20px;

    z-index: 10;

    border: none;

    background: none;

    color: white;

    font-size: 28px;
}

.shutter {
    position: absolute;

    bottom: 50px;

    width: 70px;
    height: 70px;

    border-radius: 50%;

    border: 5px solid white;
}


/* =========================================
   NAVIGATION BAR
========================================= */

.navigation-bar {
    position: absolute;

    bottom: 0;

    left: 0;

    width: 100%;

    height: 45px;

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 70px;

    z-index: 50;

    background: rgba(0,0,0,0.15);

    backdrop-filter: blur(5px);
}

.navigation-bar button {
    border: none;

    background: none;

    color: white;

    font-size: 22px;

    cursor: pointer;

    opacity: 0.9;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    body {
        background: #000;
    }

    .page {
        min-height: 100vh;
    }

    .phone {
        width: 100vw;
        height: 100vh;

        border-radius: 0;

        padding: 0;

        box-shadow: none;
    }

    .screen {
        border-radius: 0;
    }

    .phone-camera {
        top: 10px;
    }
}