/*
Theme Name: Tiny Ads Marketplace
Theme URI: https://example.com
Description: A WordPress theme for posting tiny ads with user management
Version: 1.0
Author: Your Name
Text Domain: tiny-ads
*/

:root {
    --primary: #4361ee;
    --secondary: #3a0ca3;
    --accent: #f72585;
    --success: #4cc9f0;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    padding-bottom: 50px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.logo {
    font-size: 2.8rem;
    margin-bottom: 10px;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

.main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 40px;
}

.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.card-header {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
    padding: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.card-body {
    padding: 25px;
}

.ad-form {
    flex: 1;
    min-width: 350px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

input, textarea, select {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    background: linear-gradient(to right, var(--accent), #ff52a2);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(247, 37, 133, 0.25);
}

.btn-paypal {
    background: linear-gradient(to right, #0070ba, #1546a0);
}

.btn-paypal:hover {
    box-shadow: 0 6px 12px rgba(0, 112, 186, 0.25);
}

.btn-edit {
    background: linear-gradient(to right, #4cc9f0, #2a9d8f);
    margin-bottom: 10px;
}

.btn-delete {
    background: linear-gradient(to right, #f72585, #e01e5a);
}

.ads-display {
    flex: 2;
    min-width: 350px;
}

.progress-container {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.progress-bar {
    height: 30px;
    background: var(--light-gray);
    border-radius: 15px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, var(--success), #2a9d8f);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    transition: width 1s ease-in-out;
}

.ad-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s;
    position: relative;
}

.ad-card:hover {
    transform: translateY(-5px);
}

.ad-header {
    padding: 15px 20px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: white;
}

.ad-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.ad-category {
    font-size: 0.85rem;
    opacity: 0.9;
}

.ad-body {
    padding: 20px;
}

.ad-description {
    margin-bottom: 15px;
    color: var(--gray);
}

.ad-contact {
    font-weight: 600;
    color: var(--primary);
}

.ad-actions {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.paypal-logo {
    text-align: center;
    margin: 20px 0;
    font-size: 2.5rem;
    color: #0070ba;
    font-weight: 700;
}

.success-message {
    display: none;
    text-align: center;
    padding: 20px;
    background: #e9f7ef;
    border-radius: 8px;
    margin-top: 20px;
    color: #2e8b57;
}

.success-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #2e8b57;
}

.user-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
}

.user-menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
}

footer {
    text-align: center;
    margin-top: 50px;
    color: var(--gray);
    padding: 20px;
}

.login-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.my-ads-container {
    margin-top: 30px;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .logo {
        font-size: 2.2rem;
    }
    
    .user-menu {
        position: relative;
        top: 0;
        right: 0;
        justify-content: center;
        margin-top: 15px;
    }
}