/* index.css - Styles for the main landing page */

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

/* Body styles */
body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 50px;
}

.logo {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo i {
    color: #3498db;
}

.tagline {
    font-size: 1.2rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

.status-badge {
    display: inline-block;
    background: #2ecc71;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 40px;
}

.language-picker {
    margin-top: 16px;
}

.language-select {
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 8px 12px;
    background: #ffffff;
    color: #2c3e50;
    font-size: 0.95rem;
}

.rtl {
    direction: rtl;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.card-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 20px;
}

.card-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.card-description {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.card-link:hover {
    border-bottom: 2px solid #3498db;
}

/* System Info */
.system-info {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 50px;
}

.system-info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.info-label {
    font-weight: 600;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-value {
    color: #2c3e50;
    font-size: 1.1rem;
}

/* API Endpoints */
.api-endpoints {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.api-endpoints h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.endpoint-list {
    list-style: none;
}

.endpoint-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.endpoint-item:last-child {
    border-bottom: none;
}

.endpoint-method {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.method-get {
    background: #2ecc71;
}

.method-post {
    background: #3498db;
}

.method-websocket {
    background: #9b59b6;
}

.endpoint-path {
    font-family: "Courier New", monospace;
    color: #2c3e50;
}

.endpoint-description {
    color: #7f8c8d;
    margin-left: auto;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 50px;
    color: #7f8c8d;
    font-size: 0.9rem;
    padding: 20px;
}

.footer-links {
    margin-top: 15px;
}

.footer-links a {
    color: #3498db;
    text-decoration: none;
    margin: 0 10px;
}

.footer-links a:hover {
    text-decoration: underline;
}

/* Responsive design */
@media (max-width: 768px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 20px 10px;
    }

    .logo {
        font-size: 2rem;
        flex-direction: column;
        gap: 10px;
    }
}

/* Login container styles (for inline styles that should be in CSS) */
.login-container {
    max-width: 400px;
    margin: 0 auto 50px auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.login-form-title {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.login-input-group {
    margin-bottom: 20px;
}

.login-button {
    width: 100%;
    background: #3498db;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.login-button:hover {
    background: #2980b9;
}

.login-links {
    text-align: center;
    margin-top: 20px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.login-link {
    color: #3498db;
    margin-right: 15px;
    text-decoration: none;
    cursor: pointer;
}

.logout-button {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
}

.logout-button:hover {
    background: #c0392b;
}

.user-info {
    display: none;
    text-align: center;
}

.user-info-text {
    margin-bottom: 20px;
    color: #2c3e50;
}

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

html[dir="rtl"] .toast-container {
    right: auto;
    left: 24px;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    padding: 10px 14px;
    border-radius: 10px;
    color: #1f2a37;
    background: #f8fafc;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-warning {
    border-left: 4px solid #f59e0b;
    background: #fff7ed;
}

.toast-error {
    border-left: 4px solid #ef4444;
    background: #fef2f2;
}
