* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Tahoma, Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.container {
    width: 100%;
    max-width: 500px;
}

.card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

h1 {
    color: #764ba2;
    text-align: center;
    margin-bottom: 10px;
    font-size: 28px;
}

h1 i {
    margin-left: 10px;
}

h2 {
    color: #333;
    margin-bottom: 5px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 15px;
    transition: 0.3s;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #764ba2;
    box-shadow: 0 0 0 3px rgba(118,75,162,0.1);
}

button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    margin: 5px 0;
    transition: 0.3s;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

button i {
    margin-left: 8px;
}

.btn-small {
    width: auto;
    padding: 8px 15px;
    font-size: 14px;
}

.btn-danger {
    background: #e74c3c;
}

.btn-success {
    background: #27ae60;
}

.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-btn {
    background: #e0e0e0;
    color: #333;
    margin: 0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.username {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.username i {
    margin-left: 5px;
}

.link-box {
    background: #f0f4ff;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.link-box h3 {
    color: #333;
    margin-bottom: 10px;
}

.link-box h3 i {
    margin-left: 8px;
    color: #764ba2;
}

.link-box p {
    color: #666;
    font-size: 13px;
    margin-bottom: 10px;
}

.link-url {
    display: flex;
    gap: 10px;
}

.link-url input {
    margin-bottom: 0;
    background: white;
    flex: 1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #764ba2;
}

.filter-bar {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.filter-btn {
    background: #e0e0e0;
    color: #333;
    padding: 8px;
    font-size: 13px;
    margin: 0;
    flex: 1;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.filter-btn i {
    margin-left: 5px;
}

.messages-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.message-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    border-right: 4px solid #764ba2;
}

.message-item.unread {
    background: #e8f0fe;
    border-right-color: #27ae60;
}

.message-text {
    margin-bottom: 10px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-date {
    color: #666;
    font-size: 12px;
    margin: 10px 0;
}

.message-date i {
    margin-left: 5px;
}

.message-actions {
    display: flex;
    gap: 8px;
}

.message-actions button {
    width: auto;
    padding: 5px 10px;
    font-size: 12px;
    margin: 0;
}

.message-actions button i {
    margin-left: 5px;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #999;
}

.empty-state i {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
}

.loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.loading i {
    margin-left: 8px;
}

.back-link {
    margin-top: 20px;
    text-align: center;
}

.back-link a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    color: #764ba2;
}

.back-link i {
    margin-left: 5px;
}

hr {
    margin: 20px 0;
    border: none;
    border-top: 2px dashed #eee;
}

@media (max-width: 500px) {
    .card { padding: 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .link-url { flex-direction: column; }
    .btn-small { width: 100%; }
}