﻿/* Master Stylesheet for all pages */
:root {
    --primary-color: #27ae60;
    --secondary-color: #2ecc71;
    --accent-color: #bcd735;
    --dark-bg: #2c3e50;
    --light-bg: #f4f7f6;
    --text-main: #333;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-main);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation */
#topbar {
    background: var(--dark-bg);
    color: white;
    padding: 10px 0;
    text-align: center;
    font-size: 14px;
}
#topbar a { color: var(--secondary-color); text-decoration: none; font-weight: bold; }

header {
    background: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.main-menu {
    background: var(--primary-color);
    padding: 0;
}
.main-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.main-menu ul li a {
    color: white;
    padding: 15px 20px;
    display: block;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}
.main-menu ul li a:hover { background: rgba(0,0,0,0.1); }

/* Layout Grid for all pages */
.site-layout {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

.main-content, .sidebar-content {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Forms & Tables */
input[type="text"], input[type="password"], select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.btn-action {
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

/* --- التعديلات الجديدة لصفحتي Surf و View (متجاوبة) --- */

.ads-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.ad-card {
    background: var(--white);
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: 0.3s;
}
.ad-card:hover { border-color: var(--primary-color); transform: translateY(-2px); }

.ad-card a {
    color: #fb9233;
    font-weight: bold;
    text-decoration: none;
    font-size: 15px;
}

.ad-stats-row {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: #888;
    border-top: 1px dashed #eee;
    padding-top: 8px;
}

.view-ad-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.view-header-flex {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: #fff;
    padding: 10px;
    border-bottom: 2px solid var(--dark-bg);
    flex-wrap: wrap;
}

/* Responsiveness */
@media (max-width: 768px) {
    .site-layout { grid-template-columns: 1fr; }
    .header-flex { flex-direction: column; text-align: center; }
    .view-header-flex { flex-direction: column; gap: 10px; }
}

footer {
    background: var(--dark-bg);
    color: white;
    padding: 40px 0;
    margin-top: 50px;
    text-align: center;
}