:root {
    --bg-dark: #202020;
    --bg-sidebar: #191919;
    --bg-hover: #333333;
    --text-main: #ffffff;
    --text-muted: #aaaaaa;
    --accent: #0078d4;
    --border-color: #333333;
    --success: #28a745;
    --danger: #dc3545;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100%;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.email-list {
    flex: 1;
    overflow-y: auto;
}

.email-item {
    display: flex;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.email-item:hover {
    background-color: var(--bg-hover);
}

.email-item.active {
    background-color: var(--bg-hover);
    border-left: 3px solid var(--accent);
}

.email-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.email-item-content {
    flex: 1;
    overflow: hidden;
}

.email-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.email-item-sender {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-date {
    font-size: 0.8em;
    color: var(--text-muted);
}

.email-item-subject {
    font-size: 0.9em;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.email-item-snippet {
    font-size: 0.85em;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark);
}

.top-bar {
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.action-btn {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.action-btn:hover {
    background-color: var(--bg-hover);
}

.score-container {
    border: 2px solid var(--danger);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.2em;
    background-color: rgba(220, 53, 69, 0.1);
    transition: transform 0.2s;
}

.email-view {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.email-header {
    margin-bottom: 30px;
}

.email-header h1 {
    font-size: 1.8em;
    margin-bottom: 20px;
}

.sender-info {
    display: flex;
    align-items: center;
}

.sender-info .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 15px;
}

.sender-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sender-name {
    font-weight: 600;
    font-size: 1.1em;
}

.sender-address {
    color: var(--text-muted);
    font-size: 0.9em;
}

.email-date {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-left: auto;
}

.email-body {
    background-color: #ffffff;
    color: #000000;
    padding: 30px;
    border-radius: 8px;
    min-height: 400px;
}

.empty-state {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2em;
}

/* Interaktyvūs elementai */
.suspect-element {
    cursor: pointer;
    transition: outline 0.2s, background-color 0.2s;
    border-radius: 3px;
    padding: 5px;
    display: block;
    margin-bottom: 5px;
}

.suspect-element:hover {
    outline: 2px dashed rgba(0, 120, 212, 0.6);
    outline-offset: 2px;
    background-color: rgba(0, 120, 212, 0.05);
}

.sender-name.suspect-element, .sender-address.suspect-element {
    display: inline-block;
    padding: 2px;
    margin-bottom: 0;
}

/* Specifiniai laiško turinio stiliai */
.email-body-content {
    font-family: sans-serif;
    line-height: 1.6;
}

.fake-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0078d4;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 15px;
    pointer-events: none; /* Kad nenumestų kitur */
}

.fake-link {
    color: #0078d4;
    text-decoration: underline;
    pointer-events: none;
}

.email-body-content p {
    margin-bottom: 15px;
}

/* Overlay / Lock Screen */
#overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

#overlayContent {
    background: #191919;
    padding: 50px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #333;
    max-width: 500px;
}

#overlayTitle {
    margin-bottom: 20px;
    font-size: 1.5em;
}

#nameInputContainer input {
    padding: 12px;
    font-size: 16px;
    width: 250px;
    border-radius: 4px;
    border: 1px solid #555;
    background: #222;
    color: white;
    margin-bottom: 15px;
}

#nameInputContainer button {
    padding: 12px 25px;
    background: #0078d4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
}

#nameInputContainer button:hover {
    background: #005a9e;
}

#finalScoreDisplay {
    font-size: 64px;
    color: #28a745;
    font-weight: bold;
    margin-top: 20px;
}

/* Toast (Pranešimai) */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(0);
}

.toast.success { background-color: var(--success); }
.toast.error { background-color: var(--danger); }
.toast.hidden { 
    opacity: 0; 
    pointer-events: none; 
    transform: translateY(20px);
}
