/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.4;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-family: 'Roboto', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 3px;
}

.logo h1 i {
    color: #ffcc00;
    margin-right: 8px;
}

.tagline {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Navigation */
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255,255,255,0.1);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-login {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-login:hover {
    background-color: white;
    color: #1e3c72;
}

.btn-register {
    background-color: #ffcc00;
    color: #1e3c72;
}

.btn-register:hover {
    background-color: #ffd633;
}

.btn-primary {
    background-color: #1e3c72;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #2a5298;
}

.btn-google {
    background-color: #db4437;
    color: white;
    width: 100%;
}

.btn-google:hover {
    background-color: #c33d2e;
}

.btn-view-all {
    background-color: #4CAF50;
    color: white;
    margin-top: 15px;
}

.btn-view-all:hover {
    background-color: #45a049;
}

.btn-logout {
    background-color: #f44336;
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

/* Main Layout */
.main-container {
    display: flex;
    gap: 20px;
    margin: 20px auto;
}

.side-panel {
    width: 250px;
    flex-shrink: 0;
}

.main-content {
    flex: 1;
}

/* Side Panel */
.user-info {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    margin-bottom: 15px;
}

.user-avatar {
    font-size: 60px;
    color: #1e3c72;
    margin-bottom: 10px;
}

.user-email {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.side-widget {
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.side-widget h3 {
    color: #1e3c72;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-widget ul {
    list-style: none;
}

.side-widget li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.side-widget li:last-child {
    border-bottom: none;
}

.paid-ads-side {
    border-left: 4px solid #ffcc00;
}

.featured-ad {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.featured-ad h4 {
    color: #1e3c72;
    margin-bottom: 5px;
}

/* Main Content Sections */
.welcome-section,
.recent-news,
.recent-forum,
.free-ads-preview {
    background: white;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.welcome-section h2,
.recent-news h2,
.recent-forum h2,
.free-ads-preview h2 {
    color: #1e3c72;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.feature-card {
    text-align: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-3px);
}

.feature-card i {
    font-size: 32px;
    color: #1e3c72;
    margin-bottom: 10px;
}

.feature-card h3 {
    color: #1e3c72;
    margin-bottom: 10px;
}

/* News, Forum, Ads Lists */
.news-list,
.forum-list,
.ads-grid {
    display: grid;
    gap: 15px;
}

.news-item,
.forum-post,
.ad-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #1e3c72;
}

.news-item h3,
.forum-post h3,
.ad-item h3 {
    color: #1e3c72;
    margin-bottom: 10px;
}

.news-meta,
.forum-meta,
.ad-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: flex;
    gap: 15px;
}

.ads-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* Footer */
.footer {
    background: #1e3c72;
    color: white;
    padding: 30px 0 15px;
    margin-top: 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section h3 {
    color: #ffcc00;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffcc00;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    font-size: 20px;
    color: white;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #ffcc00;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #ffcc00;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 6px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #1e3c72;
}

.oauth-login,
.oauth-register {
    margin-top: 20px;
    text-align: center;
}

.oauth-login p,
.oauth-register p {
    margin-bottom: 10px;
    color: #666;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-container {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
    }

    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .ads-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Success/Error Messages */
.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    display: none;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}