/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Top Banner */
.top-banner {
    background: linear-gradient(90deg, #2c3e50, #3498db);
    color: white;
    padding: 20px 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.banner-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.adsense-banner {
    margin-top: 20px;
}

.ad-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    color: #6c757d;
    text-align: center;
    padding: 20px;
    margin: 10px auto;
    border-radius: 8px;
}

/* Main Container Layout */
.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}

.content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.sidebar {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.adsense-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 50px;
}

.hero-section h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.hero-section p {
    font-size: 1.2rem;
    color: #7f8c8d;
}

/* Flip Cards Container */
.flip-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Flip Card Styles */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 200px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.flip-card-front {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.flip-card-back {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    transform: rotateY(180deg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.flip-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.flip-card p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.card-link {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    font-weight: bold;
}

.card-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Tools Grid for Category Pages */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tool-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* Clickable tool card enhancement */
.tool-card[onclick] {
    transition: all 0.3s ease;
}

.tool-card[onclick]:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.tool-card[onclick]:active {
    transform: translateY(-3px);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.tool-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.tool-card p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* Back Button */
.back-button {
    display: inline-block;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    text-decoration: none;
    padding: 12px 25px;
    border-radius: 25px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
    font-weight: bold;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
    margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        order: -1;
    }
    
    .banner-content h1 {
        font-size: 2rem;
    }
    
    .hero-section h2 {
        font-size: 2rem;
    }
    
    .flip-cards-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .banner-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-section h2 {
        font-size: 1.5rem;
    }
    
    .flip-card {
        height: 180px;
    }
    
    .content {
        padding: 20px;
    }
}
