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

:root {
  --sky-blue:       #00aff0;
  --skype-dark:     #005f9e;
  --title-start:    #3d96d6;
  --title-end:      #1d5fa0;
  --title-shine:    #73b8e8;
  --xp-bg:          #ece9d8;
  --xp-border:      #7f9db9;
  --xp-white:       #ffffff;
  --xp-gray:        #d4d0c8;
  --xp-text:        #000000;
  --xp-text2:       #555555;
  --select-bg:      #316ac5;
  --select-text:    #ffffff;
  --online-green:   #6fba2c;
  --call-green:     #5ca30b;
  --hangup-red:     #d41920;
  --rec-red:        #ff3333;
  --font:           Tahoma, "Segoe UI", Verdana, Geneva, sans-serif;
}

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 12px;
  color: var(--xp-text);
  background: var(--xp-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.desktop {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.skype-window {
  width: 100vw;
  height: 100vh;
  background: var(--xp-bg);
  border: 1px solid #0054e3;
  border-radius: 0;
  box-shadow: 2px 3px 14px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  user-select: none;
  transition: width .3s, height .3s, border-radius .3s;
}
.skype-window.maximized {
  width: 100% !important;
  height: 100% !important;
  border-radius: 0;
}
.skype-window.minimizing {
  animation: minimizeAnim .4s ease-in-out;
}
@keyframes minimizeAnim {
  0%   { transform: scale(1); opacity: 1; }
  50%  { transform: scale(.6) translateY(40%); opacity: .4; }
  100% { transform: scale(1); opacity: 1; }
}

.title-bar {
  height: 30px;
  background: linear-gradient(180deg, var(--title-shine) 0%, var(--title-start) 8%, var(--title-end) 90%, #0f3b6d 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 6px;
  border-radius: 0;
}

.title-left { display: flex; align-items: center; gap: 6px; }

.skype-logo {
  width: 18px; height: 18px;
  background: var(--sky-blue);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow: 0 1px 1px rgba(0,0,0,.35);
}

.title-text {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
  letter-spacing: .3px;
}

.title-buttons { display: flex; gap: 2px; }
.win-btn {
  width: 22px; height: 22px;
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 3px;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
.win-btn.min, .win-btn.max { background: linear-gradient(180deg, #5fa7e3, #3b7cc4); }
.win-btn.close { background: linear-gradient(180deg, #e88b6f, #c1432e); }
.win-btn:hover { filter: brightness(1.15); }
.win-btn:active { filter: brightness(.85); }

.menu-bar {
  height: 22px;
  background: var(--xp-bg);
  border-bottom: 1px solid #aca899;
  display: flex;
  align-items: center;
  padding: 0 2px;
  position: relative;
  z-index: 100;
}

.menu-drop {
  position: relative;
}
.menu-label {
  padding: 2px 6px;
  font-size: 11px;
  color: var(--xp-text);
  cursor: default;
  display: block;
}
.menu-label:hover, .menu-drop.open .menu-label {
  background: var(--select-bg);
  color: var(--select-text);
}

.drop-panel {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: #fff;
  border: 1px solid #919b9c;
  box-shadow: 2px 2px 4px rgba(0,0,0,.25);
  padding: 2px 0;
  z-index: 200;
}
.menu-drop.open .drop-panel { display: block; }

.drop-item {
  padding: 3px 24px 3px 8px;
  font-size: 11px;
  cursor: default;
  white-space: nowrap;
}
.drop-item:hover {
  background: var(--select-bg);
  color: var(--select-text);
}
.drop-sep {
  height: 1px;
  background: #ccc;
  margin: 3px 4px;
}

.workspace {
  flex: 1;
  display: flex;
  min-height: 0;
  border-top: 1px solid #fff;
}

.contacts-panel {
  width: 200px;
  min-width: 200px;
  background: var(--xp-white);
  border-right: 1px solid var(--xp-border);
  display: flex;
  flex-direction: column;
}

.panel-tabs { display: flex; border-bottom: 1px solid #ccc; }
.ptab {
  flex: 1;
  padding: 5px 0;
  font-size: 11px;
  font-family: var(--font);
  background: var(--xp-gray);
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--xp-text);
}
.ptab.active {
  background: var(--xp-white);
  border-bottom: 2px solid var(--sky-blue);
  font-weight: 700;
}

.search-box { padding: 4px; border-bottom: 1px solid #ddd; }
.search-box input {
  width: 100%;
  padding: 3px 5px;
  border: 1px solid #7f9db9;
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font);
  background: #fff;
}

.contact-group-label {
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 700;
  color: var(--xp-text2);
  background: #f5f5f0;
  border-bottom: 1px solid #e8e8e0;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  cursor: default;
  border-bottom: 1px solid #f0f0ea;
}
.contact-item:hover { background: #e8f0fc; }
.contact-item.selected { background: var(--select-bg); color: var(--select-text); }
.contact-item.selected .contact-mood { color: #c0d4f0; }

.status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .2s;
}
.status-dot.online  { background: var(--online-green); border: 1px solid #4a8c0f; }
.status-dot.away    { background: #f0c030; border: 1px solid #c09000; }
.status-dot.busy    { background: #e02020; border: 1px solid #a01010; }
.status-dot.offline { background: #ccc; border: 1px solid #999; }

.contact-avatar {
  width: 32px; height: 32px;
  border-radius: 4px;
  background: linear-gradient(135deg, #0a7ec2, #3db8f5);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-meta { min-width: 0; }
.contact-name { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-mood { font-size: 10px; color: var(--xp-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.contacts-filler { flex: 1; }

.recent-item {
  padding: 6px 8px;
  border-bottom: 1px solid #f0f0ea;
  cursor: default;
}
.recent-item:hover { background: #e8f0fc; }
.recent-name { font-size: 11px; font-weight: 700; color: var(--skype-dark); }
.recent-preview { font-size: 10px; color: var(--xp-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-time { font-size: 9px; color: #aaa; margin-top: 1px; }
.recent-item.faded { opacity: .5; }

.content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #f7f7f4;
  min-width: 0;
  position: relative;
}

.view-active { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.view-hidden { display: none !important; }

.profile-header {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  background: linear-gradient(180deg, #e3eef9, #d0dff0);
  border-bottom: 1px solid #b8ccde;
}

.big-avatar {
  width: 56px; height: 56px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0a7ec2, #3db8f5);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.2);
}

.profile-info h2 { font-size: 16px; color: #1a3c5e; }
.profile-status { font-size: 11px; display: flex; align-items: center; gap: 4px; color: var(--online-green); }
.profile-bio { font-size: 11px; color: var(--xp-text2); margin-top: 2px; }

.voicemail-box {
  margin: 10px 16px;
  padding: 10px 14px;
  border: 1px solid #c4d4e4;
  border-radius: 4px;
  background: #fff;
}
.voicemail-box h3 { font-size: 12px; margin-bottom: 8px; }
.badge {
  background: #e81123;
  color: #fff;
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 8px;
  font-weight: 400;
  vertical-align: middle;
}
.voicemail-controls { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.voicemail-hint { margin-top: 8px; font-size: 10px; color: #888; line-height: 1.4; }

.action-row { padding: 8px 16px; display: flex; gap: 8px; }

.chat-area {
  flex: 1;
  border-top: 1px solid #c4d4e4;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
}

.chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sys-msg {
  font-size: 10px;
  color: #888;
  text-align: center;
  padding: 2px 0;
  font-style: italic;
}

.chat-msg {
  max-width: 80%;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-word;
}
.chat-msg.incoming {
  background: #e1efff;
  align-self: flex-start;
  border: 1px solid #b8d4f0;
}
.chat-msg.incoming .msg-sender {
  display: block;
  font-weight: 700;
  font-size: 10px;
  color: var(--skype-dark);
  margin-bottom: 2px;
}
.chat-msg.flag-msg { background: #d4edda; border-color: #a3d9a5; }
.chat-msg .msg-time {
  display: block;
  font-size: 9px;
  color: #999;
  text-align: right;
  margin-top: 2px;
}

.skype-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid #7f9db9;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #e6e6e0);
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  color: var(--xp-text);
  text-decoration: none;
  white-space: nowrap;
}
.skype-btn:hover { background: linear-gradient(180deg, #e8f0fc, #d0dff0); }
.skype-btn:active { background: #c8d8e8; }

.skype-btn.green {
  background: linear-gradient(180deg, #8fd64a, #5ca30b);
  color: #fff;
  border-color: #3d7a08;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
}
.skype-btn.green:hover { filter: brightness(1.08); }

.call-btn {
  background: linear-gradient(180deg, #8fd64a, #5ca30b);
  color: #fff;
  border-color: #3d7a08;
  text-shadow: 0 1px 1px rgba(0,0,0,.25);
  font-size: 13px;
  padding: 8px 24px;
  border-radius: 4px;
}
.call-btn:hover { filter: brightness(1.08); }

.call-screen {
  flex: 1;
  background: linear-gradient(180deg, #0d1b2a, #1b2838 40%, #0d1b2a);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  color: #fff;
}

.call-big-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0a7ec2, #3db8f5);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid rgba(255,255,255,.3);
  z-index: 2;
}

.call-name { font-size: 18px; font-weight: 700; z-index: 2; }
.call-status { font-size: 12px; color: #8eb8e0; z-index: 2; }
.call-timer { font-size: 14px; color: #a0c4e0; font-variant-numeric: tabular-nums; z-index: 2; }

.call-rings {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -68%);
  pointer-events: none;
  z-index: 1;
}
.ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 80px; height: 80px;
  margin: -40px 0 0 -40px;
  border: 2px solid rgba(0,175,240,.4);
  border-radius: 50%;
  animation: ringPulse 2s ease-out infinite;
}
.ring.r2 { animation-delay: .5s; }
.ring.r3 { animation-delay: 1s; }
@keyframes ringPulse {
  0%   { transform: scale(1); opacity: .7; }
  100% { transform: scale(2.8); opacity: 0; }
}

.call-controls {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
  z-index: 2;
}

.rec-btn {
  background: linear-gradient(180deg, #4aa3df, #1a6db5);
  color: #fff;
  border-color: #0f4c81;
  font-size: 12px;
  padding: 8px 18px;
}
.rec-btn:hover { filter: brightness(1.1); }

.stop-btn {
  background: linear-gradient(180deg, #f08040, #d05020);
  color: #fff;
  border-color: #a03010;
  font-size: 12px;
  padding: 8px 18px;
}
.stop-btn:hover { filter: brightness(1.1); }

.hangup-btn {
  background: linear-gradient(180deg, #f06050, #c0281c);
  color: #fff;
  border-color: #8a1610;
  font-size: 12px;
  padding: 8px 24px;
  margin-top: 16px;
  z-index: 2;
}
.hangup-btn:hover { filter: brightness(1.1); }

.rec-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--rec-red);
  z-index: 2;
  margin-top: 6px;
}
.rec-dot {
  width: 12px; height: 12px;
  background: var(--rec-red);
  border-radius: 50%;
  animation: blink 1s ease-in-out infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .2; }
}

.processing-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: #8eb8e0;
  z-index: 2;
  margin-top: 8px;
}
.spinner {
  width: 20px; height: 20px;
  border: 3px solid rgba(255,255,255,.2);
  border-top-color: var(--sky-blue);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-bar {
  height: 22px;
  background: var(--xp-bg);
  border-top: 1px solid #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  font-size: 10px;
  color: var(--xp-text2);
}
.sb-left { display: flex; align-items: center; gap: 5px; }

.xp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.xp-dialog {
  width: 380px;
  background: var(--xp-bg);
  border: 1px solid #0054e3;
  border-radius: 8px 8px 0 0;
  box-shadow: 3px 3px 12px rgba(0,0,0,.5);
  overflow: hidden;
  user-select: none;
}
.xp-dialog-titlebar {
  height: 26px;
  background: linear-gradient(180deg, var(--title-shine), var(--title-start) 10%, var(--title-end) 90%, #0f3b6d);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 0 8px;
  border-radius: 7px 7px 0 0;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.xp-dialog-close {
  width: 18px; height: 18px;
  background: linear-gradient(180deg, #e88b6f, #c1432e);
  border: 1px solid rgba(0,0,0,.25);
  border-radius: 3px;
  color: #fff;
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xp-dialog-close:hover { filter: brightness(1.15); }
.xp-dialog-body {
  display: flex;
  gap: 12px;
  padding: 16px 16px 12px;
  align-items: flex-start;
}
.xp-dialog-icon { font-size: 32px; flex-shrink: 0; line-height: 1; }
.xp-dialog-text { font-size: 11px; line-height: 1.5; color: var(--xp-text); }
.xp-dialog-text b { color: var(--skype-dark); }
.xp-dialog-footer {
  display: flex;
  justify-content: center;
  padding: 8px 16px 14px;
}
.xp-dialog-btn {
  min-width: 75px;
  padding: 3px 16px;
  border: 1px solid #003c74;
  border-radius: 3px;
  background: linear-gradient(180deg, #fff, #e6e6e0);
  font-family: var(--font);
  font-size: 11px;
  cursor: pointer;
  color: var(--xp-text);
}
.xp-dialog-btn:hover { background: linear-gradient(180deg, #e8f0fc, #d0dff0); }
.xp-dialog-btn:active { background: #c8d8e8; }

::-webkit-scrollbar { width: 16px; }
::-webkit-scrollbar-track { background: #f1efe2; border-left: 1px solid #d5d2c6; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #c8c5b8, #b0ad9e);
  border: 1px solid #8e8b7e;
  border-radius: 0;
}
::-webkit-scrollbar-button { display: block; height: 16px; background: #ece9d8; border: 1px solid #8e8b7e; }

@media (max-width: 900px) {
  .skype-window { width: 100%; height: 100%; border-radius: 0; }
  .desktop { padding: 0; }
}
@media (max-width: 600px) {
  .contacts-panel { width: 60px; min-width: 60px; }
  .contact-meta, .search-box, .contact-group-label, .panel-tabs { display: none; }
  .contact-avatar { margin: 0 auto; }
}
