/* -------------------------
   Global
------------------------- */

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

body{
    font-family:Arial, Helvetica, sans-serif;
    overflow:hidden;
    color:white;
    height:100vh;

    background:
    radial-gradient(circle at 20% 20%, #2dd4bf55, transparent 30%),
    radial-gradient(circle at 80% 25%, #8b5cf655, transparent 35%),
    linear-gradient(135deg,#07111f,#17143a,#231942);
}


/* -------------------------
   Welcome Screen
------------------------- */

#welcomeScreen{
    position:absolute;
    inset:0;

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

.welcome-window{

    width:700px;
    max-width:90%;

    padding:60px;

    text-align:center;

    border-radius:28px;

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

    background:rgba(255,255,255,.08);

    backdrop-filter:blur(20px);

    box-shadow:0 30px 70px rgba(0,0,0,.35);

}

.logo{

    width:80px;
    height:80px;

    margin:auto;
    margin-bottom:25px;

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

    border-radius:22px;

    font-size:36px;

    background:linear-gradient(
    135deg,
    #2dd4bf,
    #3b82f6,
    #8b5cf6);

}

h1{

    font-size:64px;

}

.welcome-text{

    margin-top:16px;

    color:#d7e2f5;

    font-size:22px;

}

.enter-button{

    margin-top:35px;

    padding:14px 34px;

    border:none;

    border-radius:999px;

    color:white;

    font-size:16px;

    cursor:pointer;

    background:rgba(255,255,255,.15);

    transition:.25s;

}

.enter-button:hover{

    background:rgba(255,255,255,.28);

}


/* -------------------------
   Desktop
------------------------- */

#desktop{

    display:none;

    position:absolute;

    inset:0;

}


/* -------------------------
   Top Bar
------------------------- */

.top-bar{

    position:absolute;

    top:0;

    left:0;

    width:100%;

    height:52px;

    padding:0 20px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    backdrop-filter:blur(18px);

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

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

}

.os-button{

    border:none;

    color:white;

    cursor:pointer;

    border-radius:14px;

    padding:8px 16px;

    background:rgba(255,255,255,.12);

}

.os-button:hover{

    background:rgba(255,255,255,.22);

}

.top-center{

    color:#dbeafe;

}

#timeElement{

    font-size:14px;

}


/* -------------------------
   Desktop Icons
------------------------- */

.desktop-icons{

    margin-top:90px;

    margin-left:35px;

    display:grid;

    grid-template-columns:repeat(2,100px);

    gap:28px;

}

.desktop-icon{

    background:none;

    border:none;

    color:white;

    cursor:pointer;

}

.icon-box{

    width:70px;

    height:70px;

    margin:auto;

    margin-bottom:8px;

    display:flex;

    justify-content:center;

    align-items:center;

    border-radius:18px;

    font-size:32px;

    background:rgba(255,255,255,.12);

    backdrop-filter:blur(12px);

}

.icon-name{

    display:block;

    text-align:center;

}


/* -------------------------
   Window
------------------------- */

.app-window{

    position:absolute;

    top:170px;

    left:50%;

    transform:translateX(-50%);

    width:560px;

    border-radius:24px;

    overflow:hidden;

    background:rgba(20,25,55,.72);

    backdrop-filter:blur(20px);

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

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

}

.window-header{

    height:48px;

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:0 15px;

    cursor:grab;

    user-select:none;

    background:rgba(255,255,255,.08);

}

.window-title{

    font-size:14px;

    font-weight:bold;

}

.close-button{

    width:28px;

    height:28px;

    border:none;

    cursor:pointer;

    color:white;

    border-radius:50%;

    background:#ff5b5b;

}

.close-button:hover{

    background:#ff3131;

}

.window-content{

    padding:30px;

}

.window-content h2{

    margin-bottom:15px;

}

.window-content p{

    margin-top:10px;

    color:#d5dff2;

}

/* -------------------------
   Aurora Journal App
------------------------- */

.journal-window {
  display: none;
  top: 120px;
  left: 50%;
  width: 760px;
  max-width: 90%;
  transform: translateX(-50%);
}

.journal-content {
  height: 460px;
  display: flex;
  background: rgba(245, 247, 255, 0.96);
  color: #172033;
}

.journal-sidebar {
  width: 210px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(225, 230, 245, 0.95);
  border-right: 1px solid rgba(20, 30, 60, 0.12);
}

.journal-entry {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  text-align: left;
  color: #26304a;
  background: transparent;
  cursor: pointer;
  transition: 0.2s;
}

.journal-entry:hover {
  background: rgba(99, 102, 241, 0.12);
}

.journal-entry strong {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
}

.journal-entry span {
  font-size: 12px;
  color: #727b91;
}

.active-entry {
  background: rgba(99, 102, 241, 0.18);
}

.journal-page {
  flex: 1;
  padding: 38px;
  overflow-y: auto;
  background:
    linear-gradient(
      rgba(255, 255, 255, 0.92),
      rgba(248, 250, 255, 0.92)
    );
}

.journal-page h2 {
  margin: 8px 0 20px;
  font-size: 30px;
  color: #222b45;
}

.journal-page p {
  margin-bottom: 18px;
  line-height: 1.7;
  color: #4a5368;
}

.journal-date {
  font-size: 13px;
  color: #8a92a5;
}

.journal-page blockquote {
  margin: 25px 0;
  padding: 18px 20px;
  border-left: 4px solid #7c74e8;
  border-radius: 0 12px 12px 0;
  color: #4c477d;
  background: rgba(124, 116, 232, 0.1);
  font-style: italic;
}

/* -------------------------
   Weather App
------------------------- */

.weather-window {
  display: none;
  top: 105px;
  left: 50%;
  width: 460px;
  max-width: 90%;
  transform: translateX(-50%);
}

.weather-content {
  min-height: 490px;
  padding: 35px;
  text-align: center;
  color: white;
  background:
    radial-gradient(
      circle at 30% 20%,
      rgba(125, 211, 252, 0.35),
      transparent 35%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(167, 139, 250, 0.32),
      transparent 40%
    ),
    linear-gradient(
      145deg,
      #142443,
      #29235c
    );
}

.weather-label {
  margin: 0 0 7px;
  color: #b7c9e9;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.4px;
}

#weatherLocation {
  margin: 0;
  font-size: 27px;
}

.weather-icon {
  margin-top: 24px;
  font-size: 72px;
  filter: drop-shadow(
    0 10px 20px rgba(0, 0, 0, 0.25)
  );
}

.weather-temperature {
  margin: 5px 0;
  font-size: 68px;
  font-weight: bold;
  letter-spacing: -4px;
}

.weather-description {
  margin: 0 0 28px;
  color: #dbe7fb;
  font-size: 17px;
}

.weather-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.weather-detail {
  padding: 15px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
}

.weather-detail span,
.weather-detail strong {
  display: block;
}

.weather-detail span {
  margin-bottom: 8px;
  color: #becde7;
  font-size: 12px;
}

.weather-detail strong {
  font-size: 15px;
}

.weather-updated {
  min-height: 18px;
  margin: 22px 0 12px;
  color: #aebed9;
  font-size: 12px;
}

.weather-refresh {
  padding: 11px 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: white;
  background: rgba(255, 255, 255, 0.11);
  cursor: pointer;
}

.weather-refresh:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* -------------------------
   Settings
------------------------- */

.settings-window{
    display:none;

    width:420px;

    top:140px;
    left:50%;

    transform:translateX(-50%);
}

.settings-content{

    padding:30px;

    background:#ffffff;

    color:#222;

}

.settings-content h2{

    margin-top:0;
    margin-bottom:20px;

}

.wallpaper-button{

    width:100%;

    padding:14px;

    margin-bottom:12px;

    border:none;

    border-radius:12px;

    cursor:pointer;

    font-size:16px;

    transition:.2s;

}

.wallpaper-button:hover{

    transform:scale(1.02);

}

/* -------------------------
   Boot Animation
------------------------- */

.boot-bar{

    width:100%;

    height:12px;

    margin-top:30px;

    overflow:hidden;

    border-radius:999px;

    background:rgba(255,255,255,.15);

}

.boot-progress{

    width:0%;

    height:100%;

    border-radius:999px;

    background:linear-gradient(
        90deg,
        #2dd4bf,
        #3b82f6,
        #8b5cf6
    );

    transition:.2s;

}

.boot-percent{

    margin-top:15px;

    color:#dbeafe;

    font-size:15px;

}

/* -------------------------
   Window Open Animation
------------------------- */

@keyframes windowOpen {
  from {
    opacity: 0;
    transform: scale(0.92);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.window-opening {
  animation: windowOpen 0.22s ease-out;
}

/* Resize Handle */

.resize-handle {

    position: absolute;

    width: 16px;
    height: 16px;

    right: 0;
    bottom: 0;

    cursor: nwse-resize;

    border-radius: 0 0 18px 0;

    background:
        linear-gradient(
            135deg,
            transparent 45%,
            rgba(255,255,255,.45) 45%,
            rgba(255,255,255,.45) 60%,
            transparent 60%
        );
}

/* -------------------------
   Resizable Window Layout
------------------------- */

.app-window {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  min-height: 220px;
  max-width: calc(100vw - 12px);
  max-height: calc(100vh - 58px);
}

.window-header {
  flex: 0 0 48px;
}

.window-content,
.settings-content,
.weather-content,
.journal-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

/* Journal */

.journal-window {
  min-width: 520px;
  min-height: 360px;
}

.journal-content {
  height: auto;
  display: flex;
}

.journal-sidebar {
  flex: 0 0 210px;
  height: 100%;
  overflow-y: auto;
}

.journal-page {
  flex: 1;
  min-width: 0;
  height: 100%;
  overflow: auto;
}

.journal-page h2 {
  font-size: clamp(22px, 3vw, 30px);
}

.journal-page p,
.journal-page blockquote {
  overflow-wrap: anywhere;
}

/* Weather */

.weather-window {
  min-width: 320px;
  min-height: 500px;
}

.weather-content {
  min-height: 0;
  height: auto;
}

.weather-temperature {
  font-size: clamp(42px, 8vw, 68px);
}

.weather-details {
  grid-template-columns:
    repeat(auto-fit, minmax(90px, 1fr));
}

/* Settings */

.settings-content {
  height: auto;
}

/* Resize handle */

.resize-handle {
  z-index: 1000;
  touch-action: none;
}

.language-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.language-button {
  padding: 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #eeeeee;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.language-button:hover {
  transform: translateY(-2px);
  background: #e2e2e2;
}

.language-button.active-language {
  border-color: #6366f1;
  background: #e8e7ff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.feedback-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.feedback-section h2 {
  margin: 0 0 10px;
}

.feedback-description {
  margin: 0 0 14px;
  color: #64748b;
  line-height: 1.5;
}

.feedback-button {
  display: block;
  width: 100%;
  padding: 14px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(
    135deg,
    #3b82f6,
    #8b5cf6
  );
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: 0.2s;
}

.feedback-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}