/* css/main.css - Main stylesheet for all pages */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
}

/* Header Styles */
.header {
    background: #fbf3e9;
    border-bottom: 1px solid #e0e0e0;
    padding: 0 30px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav a {
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav a:hover {
    color: #667eea;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.username {
    color: #333;
    font-weight: 600;
}

.logout-btn {
    color: #666;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
}

.logout-btn:hover {
    background: #f5f5f5;
}

.logout-btn img,
.btn-nav img {
    width: 20px;
    height: 20px;
    display: block;
}

/* Container & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Typography */
h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 32px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
}

.card-text {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
}

select {
    background: white;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn img {
    width: 20px;
    height: 20px;
    display: block;
    filter: brightness(0) invert(1);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #f0f4ff;
    transform: translateY(-2px);
}

.btn-danger {
    background: #f44336;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-small {
    padding: 8px 12px;
    background: white;
    color: #666;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
}

.btn-small img {
    width: 18px;
    height: 18px;
    display: block;
}

.btn-small:hover {
    border-color: #667eea;
    color: #667eea;
}

.btn-small.danger {
    border-color: #f44336;
    color: #f44336;
}

.btn-small.danger:hover {
    background: #f44336;
    color: white;
}

/* Badges */
.badge,
.profile-badge,
.spectrum-badge,
.topic-badge,
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.profile-badge,
.spectrum-badge,
.topic-badge {
    background: #e3f2fd;
    color: #1565c0;
}

.status-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Alerts & Messages */
.message {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #2e7d32;
}

.error {
    background: #ffebee;
    color: #c62828;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #c62828;
}

.alert {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.alert-text {
    color: #e65100;
    line-height: 1.6;
}

.alert a {
    color: #e65100;
    font-weight: 600;
    text-decoration: underline;
}

.info-box {
    background: #e3f2fd;
    border-left: 4px solid #1565c0;
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.info-text {
    color: #1565c0;
    font-size: 14px;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

/* Timestamps */
.timestamp {
    color: #999;
    font-size: 13px;
}

/* Utilities */
.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

/* Site Footer */
.site-footer {
    background: #2d2d2d;
    color: rgba(255, 255, 255, 0.7);
    padding: 30px 20px;
    margin-top: 60px;
}

.site-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.site-footer-links {
    display: flex;
    gap: 25px;
}

.site-footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
}

.site-footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.site-footer-copyright {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 600px) {
    .site-footer-content {
        flex-direction: column;
        text-align: center;
    }
}