:root {
    --primary-color: #4a6bff;
    --secondary-color: #f5f7ff;
    --text-color: #333;
    --bg-color: #fff;
    --card-bg: #f9f9f9;
    --border-color: #e0e0e0;
    --safe-color: #4CAF50;
    --unsafe-color: #F44336;
    --warning-color: #FF9800;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --sidebar-active: #34495e;
}

.dark-mode {
    --primary-color: #5d7aff;
    --secondary-color: #1a1a2e;
    --text-color: #f0f0f0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --border-color: #333;
    --sidebar-bg: #1a1a2e;
    --sidebar-text: #e2e2e2;
    --sidebar-active: #16213e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body:not([dir="rtl"]) {
    direction: ltr;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.shield-icon {
    font-size: 2rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
}

#language-select {
    padding: 0.5rem;
    border-radius: 5px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

#language-select option {
    color: #333;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    height: calc(100vh - 70px);
    position: fixed;
    top: 70px;
    padding-top: 1rem;
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    color: var(--sidebar-text);
    text-align: right;
    cursor: pointer;
    font-size: 1rem;
}

.sidebar-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-btn.active {
    background-color: var(--sidebar-active);
    border-right: 4px solid var(--primary-color);
}

.sidebar-btn i {
    font-size: 1.2rem;
}

main {
    margin-right: 250px;
    padding: 2rem;
    flex: 1;
}

.page {
    display: none;
    animation: fadeIn 0.5s;
}

.page.active {
    display: block;
}

.scan-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

#url-input, #url-input-en, #url-input-fr, #url-input-he {
    flex: 1;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
}

#scan-btn, #scan-btn-en, #scan-btn-fr, #scan-btn-he {
    padding: 0 2rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
}

#scan-btn:hover, #scan-btn-en:hover, #scan-btn-fr:hover, #scan-btn-he:hover {
    background-color: #3a5bef;
}

.result-container {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    border-left: 5px solid var(--primary-color);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.security-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: bold;
}

#security-status-icon {
    font-size: 1.5rem;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem;
    background-color: var(--bg-color);
    border-radius: 5px;
}

.detail-item span:first-child {
    font-weight: bold;
}

.verdict {
    padding: 1rem;
    background-color: var(--bg-color);
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.content-box {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-box p, .content-box ol {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.content-box ol {
    padding-right: 1.5rem;
}

body:not([dir="rtl"]) .content-box ol {
    padding-left: 1.5rem;
    padding-right: 0;
}

.content-box li {
    margin-bottom: 0.5rem;
}

.telegram-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background-color: #0088cc;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 1rem;
}

.telegram-btn:hover {
    background-color: #0077b3;
}

.install-prompt {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 90%;
    width: 400px;
}

.install-prompt p {
    margin-bottom: 1.5rem;
    text-align: center;
}

.install-btns {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

#install-btn, #install-btn-en, #install-btn-fr, #install-btn-he {
    padding: 0.5rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

#cancel-install-btn, #cancel-install-btn-en, #cancel-install-btn-fr, #cancel-install-btn-he {
    padding: 0.5rem 1.5rem;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    main {
        margin-right: 200px;
    }
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0;
    }
    
    .sidebar-btn {
        width: auto;
        padding: 0.8rem 1rem;
    }
    
    .sidebar-btn.active {
        border-right: none;
        border-bottom: 4px solid var(--primary-color);
    }
    
    main {
        margin-right: 0;
        padding: 1rem;
    }
    
    .scan-container, .content-box {
        padding: 1.5rem;
    }
    
    .input-container {
        flex-direction: column;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .install-prompt {
        width: 90%;
    }
    
    .install-btns {
        flex-direction: column;
    }
    
    #install-btn, #cancel-install-btn, 
    #install-btn-en, #cancel-install-btn-en,
    #install-btn-fr, #cancel-install-btn-fr,
    #install-btn-he, #cancel-install-btn-he {
        width: 100%;
    }
}