/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --secondary-color: #50C878;
    --background-light: #F8F9FA;
    --background-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-gray: #6C757D;
    --border-color: #E0E0E0;
    --success-color: #28A745;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #F8F9FA 0%, #E9ECEF 100%);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
}

/* Container Layout with Sidebar Ads */
.container {
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    max-width: 1600px;
    margin: 0 auto;
    gap: 20px;
    padding: 20px;
}

/* Sidebar Ad Spaces */
.sidebar-ad {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-ad .ad-placeholder {
    background: var(--background-white);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: var(--text-gray);
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Content Area */
.main-content {
    background: var(--background-white);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    padding: 40px;
    max-width: 900px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-weight: 400;
}

/* Tool Section */
.tool-section {
    margin-bottom: 40px;
}

.tool-container {
    background: linear-gradient(135deg, #EBF5FF 0%, #F0F8FF 100%);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-light);
}

.tool-container h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

/* Input Group */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
}

.input-group input[type="url"] {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.input-group input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-skip {
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: #3A7BC8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
    margin-left: 10px;
}

.btn-secondary:hover {
    background: #40B868;
    transform: translateY(-2px);
}

/* Output Section */
.output-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.output-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.output-group input {
    flex: 1;
    padding: 15px;
    font-size: 1rem;
    border: 2px solid var(--success-color);
    border-radius: 8px;
    background: #F0FFF4;
}

.success-message {
    color: var(--success-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Info Section */
.info-section {
    background: var(--background-white);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.info-section p {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.benefits-list, .use-cases {
    list-style: none;
    padding-left: 0;
}

.benefits-list li, .use-cases li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    color: var(--text-dark);
}

.benefits-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.use-cases li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Manual Ads Section */
.manual-ads {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.ad-column {
    display: flex;
    justify-content: center;
}

.ad-box {
    background: var(--background-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease;
}

.ad-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.ad-box img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content Ad Section */
.content-ad-section {
    margin: 40px 0;
    text-align: center;
}

.content-ad-section .ad-placeholder.horizontal {
    background: var(--background-white);
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px;
    color: var(--text-gray);
}

/* Footer */
footer {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
    text-align: center;
    color: var(--text-gray);
}

footer p {
    margin: 10px 0;
}

.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ========================= */
/* REDIRECT PAGE STYLES */
/* ========================= */

.redirect-page {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
}

.redirect-content {
    background: var(--background-white);
}

.redirect-section {
    margin-bottom: 40px;
}

.redirect-container {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #EBF5FF 0%, #F0F8FF 100%);
    border-radius: 12px;
}

.redirect-container h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.redirect-message {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

/* Timer Display */
.timer-display {
    margin: 40px 0;
}

.timer-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.timer-circle span {
    font-size: 5rem;
    font-weight: 700;
    color: white;
}

.timer-label {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-top: 10px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 24px rgba(74, 144, 226, 0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 12px 32px rgba(74, 144, 226, 0.5);
    }
}

/* Skip Button */
.btn-skip {
    background: var(--secondary-color);
    color: white;
    font-size: 1.2rem;
    padding: 18px 40px;
    margin: 20px auto;
    display: block;
}

.btn-skip:hover {
    background: #40B868;
    transform: translateY(-3px);
    box-shadow: var(--shadow-medium);
}

.redirect-info {
    margin-top: 40px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
}

.info-text {
    color: var(--text-dark);
    font-size: 1rem;
}

/* ========================= */
/* RESPONSIVE DESIGN */
/* ========================= */

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar-ad {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .manual-ads {
        grid-template-columns: 1fr;
    }
    
    .output-group {
        flex-direction: column;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
    }
    
    .timer-circle {
        width: 150px;
        height: 150px;
    }
    
    .timer-circle span {
        font-size: 3.5rem;
    }
}

@media (max-width: 480px) {
    .tool-container, .redirect-container {
        padding: 20px;
    }
    
    .redirect-container h1 {
        font-size: 1.8rem;
    }
}
