/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header styles */
header {
    background: linear-gradient(135deg, #4b6cb7 0%, #182848 100%);
    color: white;
    padding: 1rem 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-size: 1.8rem;
    margin: 0;
}

.logo a {
    color: white;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav li {
    margin-left: 1.5rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 0.8;
    border-bottom: 2px solid white;
}

.social-badges {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Sticky social icons */
.sticky-social {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.social-icon:hover {
    transform: scale(1.1);
}

.social-icon.facebook {
    background-color: #3b5998;
}

.social-icon.twitter {
    background-color: #1da1f2;
}

.social-icon.linkedin {
    background-color: #0077b5;
}

/* ========================= */
/* AD CONTAINER STYLES */
/* ========================= */

/* Main Ad Container Styles */
.ad-container {
    margin: 20px 0;
    text-align: center;
    display: flex;
    justify-content: center;
    width: 100%;
}

.ad-leaderboard {
    margin: 0 auto 20px;
    max-width: 728px;
    padding: 10px 0;
}

.ad-medium-rectangle {
    margin: 30px auto;
    justify-content: center;
    max-width: 300px;
}

.ad-large-offer {
    margin: 40px auto;
    max-width: 700px;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #fff8f6, #ffeae6);
    border: 2px solid #ff6b35;
}

.ad-skyscraper {
    margin: 20px auto;
    max-width: 160px;
}

.ad-square {
    margin: 20px auto;
    max-width: 250px;
}

/* Ad Placeholder Styles */
.ad-placeholder {
    border: 2px dashed #ddd;
    background: #f8f9fa;
    padding: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
}

.ad-leaderboard .ad-placeholder {
    min-height: 90px;
    max-width: 728px;
}

.ad-medium-rectangle .ad-placeholder {
    min-height: 250px;
    max-width: 300px;
}

.ad-large-offer .ad-placeholder {
    min-height: 300px;
    max-width: 700px;
    background: transparent;
    border: none;
    padding: 0;
}

.ad-skyscraper .ad-placeholder {
    min-height: 600px;
    max-width: 160px;
}

.ad-square .ad-placeholder {
    min-height: 250px;
    max-width: 250px;
}

.ad-placeholder span {
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.ad-large-offer .ad-placeholder span {
    display: none;
}

/* Offer Content Styles */
.offer-content {
    text-align: center;
    padding: 40px 20px;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
}

.offer-content h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: bold;
}

.offer-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
    font-size: 18px;
    max-width: 500px;
}

.offer-btn {
    background: white;
    color: #ff6b35;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.offer-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: #f8f9fa;
}

/* Sticky Ad Button */
.sticky-ad-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ff6b35, #ff8c42);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-ad-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.5);
}

/* Ad Content Styles */
.ad-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-content .demo-ad {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    border: 1px solid #ddd;
    color: #666;
    font-size: 14px;
}

/* ========================= */
/* MAIN LAYOUT WITH ADS */
/* ========================= */

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 20px;
}

.content-area {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Form styles */
.url-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    background: #4b6cb7;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.3s;
}

button:hover {
    background: #3a5999;
}

/* Result styles */
.result-container {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #4b6cb7;
}

.original-url {
    word-break: break-all;
    padding: 0.5rem;
    background: white;
    border-radius: 4px;
    border: 1px solid #eee;
    display: inline-block;
    margin: 0.5rem 0;
}

.security-rating {
    margin-top: 1.5rem;
}

.rating-excellent {
    color: #28a745;
    font-weight: bold;
}

.rating-good {
    color: #17a2b8;
    font-weight: bold;
}

.rating-fair {
    color: #ffc107;
    font-weight: bold;
}

.rating-poor {
    color: #fd7e14;
    font-weight: bold;
}

.rating-critical {
    color: #dc3545;
    font-weight: bold;
}

.rating-score {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0.5rem 0;
}

.score-bar {
    flex-grow: 1;
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #dc3545, #fd7e14, #ffc107, #17a2b8, #28a745);
}

.rating-details ul {
    list-style: none;
    margin-top: 0.5rem;
}

.rating-details li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #eee;
}

/* Rating info */
.rating-info {
    margin-top: 2rem;
}

.criteria-list {
    margin: 1rem 0;
}

.criterion {
    margin-bottom: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.criterion h4 {
    margin-bottom: 0.5rem;
}

.rating-levels ul {
    list-style: none;
    margin-top: 0.5rem;
}

.rating-levels li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

/* Sidebar styles */
.sidebar-widget {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4b6cb7;
}

.recent-checks {
    list-style: none;
}

.recent-check {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.short-url {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    word-break: break-all;
}

.security-rating-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    margin: 0.25rem 0;
}

.security-rating-badge.rating-excellent { background: #28a745; }
.security-rating-badge.rating-good { background: #17a2b8; }
.security-rating-badge.rating-fair { background: #ffc107; }
.security-rating-badge.rating-poor { background: #fd7e14; }
.security-rating-badge.rating-critical { background: #dc3545; }

.check-time {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.security-tips {
    list-style: none;
}

.security-tips li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.security-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
}

/* ========================= */
/* MODAL STYLES FOR ADS */
/* ========================= */

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}

.timer-display {
    font-size: 32px;
    font-weight: bold;
    color: #ff6b35;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
}

.timer-progress {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #ff6b35;
    width: 100%;
    animation: progress 30s linear forwards;
}

@keyframes progress {
    0% { width: 100%; }
    100% { width: 0%; }
}

#closeAdBlockModal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 15px;
}

/* Error message */
.error-message {
    padding: 1rem;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 1rem;
}

/* Footer styles */
footer {
    background: #343a40;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #f8f9fa;
    text-decoration: none;
}

.footer-section a:hover {
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.newsletter-form {
    display: flex;
    margin-top: 0.5rem;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

.newsletter-form button {
    border-radius: 0 4px 4px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #6c757d;
}

/* ========================= */
/* EXISTING UTILITY STYLES */
/* ========================= */

/* Tooltip styles */
.tooltip {
    position: fixed;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    z-index: 1000;
    pointer-events: none;
}

/* Copy button styles */
.copy-btn {
    background: #4b6cb7;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 12px;
}

.copy-btn:hover {
    background: #3a5999;
}

/* Error message styles */
.error {
    border-color: #dc3545 !important;
}

.error-message {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
}

/* Loading indicator */
.loading-indicator {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 10px 0;
    text-align: center;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: black;
}

/* Animation styles */
.fade-in {
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.fade-in.animate {
    opacity: 1;
}

.slide-in {
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.slide-in.animate {
    transform: translateY(0);
    opacity: 1;
}

/* Security preview styles */
.security-preview {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-top: 10px;
}

/* ========================= */
/* RESPONSIVE STYLES */
/* ========================= */

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .sidebar {
        position: static;
    }
    
    .ad-leaderboard {
        max-width: 100%;
    }
    
    .ad-container {
        margin: 15px 0;
    }

    .ad-skyscraper,
    .ad-square {
        max-width: 100%;
    }

    .ad-skyscraper .ad-placeholder,
    .ad-square .ad-placeholder {
        max-width: 300px;
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .ad-large-offer {
        max-width: 100%;
        margin: 20px 0;
    }

    .offer-content {
        padding: 30px 15px;
    }

    .offer-content h3 {
        font-size: 24px;
    }

    .offer-content p {
        font-size: 16px;
    }

    .sticky-ad-button {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
        font-size: 12px;
    }

    .content-area,
    .sidebar-widget {
        padding: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .social-badges {
        justify-content: center;
        width: 100%;
    }

    .sticky-social {
        flex-direction: row;
        top: auto;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 576px) {
    header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-nav ul {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .main-nav li {
        margin: 0 0.5rem;
    }

    .ad-leaderboard .ad-placeholder {
        min-height: 100px;
    }

    .ad-medium-rectangle .ad-placeholder,
    .ad-square .ad-placeholder {
        min-height: 200px;
    }

    .ad-large-offer .ad-placeholder {
        min-height: 250px;
    }

    .offer-btn {
        padding: 12px 25px;
        font-size: 16px;
    }
}