:root {
    --msn-blue-light: #eff3f7;
    --msn-blue-dark: #639ace;
    --msn-border: #80a6ce;
    --msn-text: #000;
    --msn-header-bg: linear-gradient(to bottom, #d6e9f8 0%, #a4ccea 100%); /* Lighter, glossier */
    --msn-window-bg: #ebf4fb;
    --msn-input-border: #8ba0b9;
    --msn-btn-bg: linear-gradient(to bottom, #f0f6fb 0%, #d8e5f5 100%);
    --msn-btn-border: #8ba0b9;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('../assets/background.jpg') no-repeat center center fixed; /* Placeholder for typical bliss/blue bg */
    background-color: #a4ccea; 
    background-size: cover;
    height: 100vh;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Login Window */
.login-window {
    width: 340px;
    background: #fff;
    border: 1px solid #5a7da0;
    border-radius: 6px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.login-header {
    background: var(--msn-header-bg);
    padding: 8px 12px;
    border-bottom: 1px solid #8caecf;
    display: flex;
    align-items: center;
}

.login-header h1 {
    font-size: 14px;
    margin: 0;
    color: #15428b;
    font-weight: bold;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.login-body {
    padding: 25px;
    background: linear-gradient(to bottom, #ffffff 0%, #eff6fd 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-placeholder {
    width: 96px;
    height: 96px;
    background: #eef3fa;
    border: 2px solid #fff;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #a4ccea;
}

form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

input {
    padding: 6px 8px;
    border: 1px solid var(--msn-input-border);
    border-radius: 2px;
    font-size: 12px;
    font-family: 'Segoe UI', sans-serif;
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

button {
    padding: 6px 12px;
    background: var(--msn-btn-bg);
    border: 1px solid var(--msn-btn-border);
    border-radius: 3px;
    cursor: pointer;
    font-weight: normal;
    font-size: 12px;
    color: #1e395b;
    min-width: 80px;
    align-self: center;
}

button:hover {
    background: linear-gradient(to bottom, #fff 0%, #eef5fb 100%);
    border-color: #639ace;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.links {
    margin-top: 20px;
    font-size: 11px;
    text-align: center;
    color: #15428b;
}

.links a {
    color: #15428b;
    text-decoration: underline;
}

/* Utils */
.hidden {
    display: none !important;
}

/* Contact List */
.main-window {
    width: 300px;
    height: 600px;
    background: linear-gradient(to bottom, #e4effb 0%, #ffffff 100%);
    border: 1px solid #6688aa;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
}

.user-card {
    padding: 10px;
    background: linear-gradient(to bottom, #dbebf9 0%, #cce0f5 100%);
    border-bottom: 1px solid #bad3ea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar-small {
    width: 48px;
    height: 48px;
    background: #fff;
    border: 1px solid #8ba0b9;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 24px;
}

.user-info {
    flex-grow: 1;
}

.user-name {
    font-weight: bold;
    font-size: 14px;
    color: #1e395b;
}

.subnick {
    font-size: 11px;
    color: #555;
    font-style: italic;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 1px 2px;
}

.subnick:hover {
    border-color: #bad3ea;
    background: #fff;
}

.status-select {
    font-size: 11px;
    margin-top: 4px;
    border: 1px solid #aaccf6;
    background: #fff;
    color: #1e395b;
    border-radius: 2px;
}

.contact-list {
    flex-grow: 1;
    overflow-y: auto;
    padding: 5px;
    background: #fff;
    border-top: 1px solid #fff;
}

.group-header {
    font-size: 11px;
    color: #1e395b;
    background: #f0f6fb;
    padding: 4px 8px;
    margin-top: 5px;
    margin-bottom: 2px;
    cursor: pointer;
    font-weight: bold;
    border: 1px solid #e2eaf3;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.1s;
    border: 1px solid transparent;
}

.contact-item:hover {
    background: #eef6fb;
    border-color: #dcebf7;
}

/* Chat Window */
.chat-window {
    position: absolute;
    width: 450px;
    height: 400px;
    background: #ebf4fb;
    border: 1px solid #5a7da0;
    border-radius: 6px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.chat-header {
    background: var(--msn-header-bg);
    padding: 6px 10px;
    border-bottom: 1px solid #8caecf;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    color: #15428b;
    font-weight: bold;
    font-size: 13px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.chat-header button {
    background: transparent;
    border: none;
    font-weight: bold;
    color: #15428b;
    font-size: 14px;
    cursor: pointer;
    min-width: auto;
}

.chat-header button:hover {
    color: red;
    background: transparent;
    border: none;
    box-shadow: none;
}

.chat-messages {
    flex-grow: 1;
    background: #fff;
    border: 1px solid #bcd;
    margin: 8px;
    padding: 8px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.4;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.chat-toolbar {
    padding: 0 8px 5px 8px;
    display: flex;
    gap: 4px;
    background: #ebf4fb;
}

.chat-toolbar button {
    font-size: 14px;
    padding: 4px 8px;
    min-width: 30px;
}

.chat-input-area {
    height: 70px;
    margin: 0 8px 8px 8px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-input {
    flex-grow: 1;
    border: 1px solid #bcd;
    padding: 5px;
    font-family: inherit;
    resize: none;
    border-radius: 2px;
}

/* Animations */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.nudge-anim {
    animation: shake 0.5s;
    animation-iteration-count: 1;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); /* Add glow for emphasis */
}

.wink-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.9);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    animation: fadeInOut 2.5s forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 1; transform: scale(1.1); }
    40% { transform: scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Status Dots */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 2px; /* Square with rounded corners (MSN style) */
    border: 1px solid #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.3);
    position: relative;
}

.status-online { background: #60c558; border: 1px solid #3b8e36; }
.status-busy { background: #e64b4b; border: 1px solid #b32d2d; }
.status-away { background: #fdc23e; border: 1px solid #d49a15; }
.status-invisible { background: #fff; border: 1px solid #aaa; }
.status-offline { background: #aaa; border: 1px solid #777; }

/* Scrollbars (Chrome/Safari) */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #f0f0f0; 
}
::-webkit-scrollbar-thumb {
    background: #c1c1c1; 
    border: 1px solid #f0f0f0;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8; 
}

/* Game Styles */
.game-container {
    width: 200px;
    height: 200px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin: 10px auto;
    background: #333;
    padding: 4px;
    border-radius: 4px;
}

.game-cell {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.game-cell:hover {
    background: #eee;
}
