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

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    min-height: 100vh;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #fff;
    z-index: 1000;
    padding: 1rem 0;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #00bcd4;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: #00bcd4;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00bcd4;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Search */
.search-container {
    position: relative;
    margin: 0 2rem;
}

.search-input {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: #fff;
    color: #333;
    font-size: 1rem;
    width: 300px;
}

.search-input:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.2);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.3s;
}

.search-result-item:hover {
    background: #f8f9fa;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: linear-gradient(135deg, #00bcd4 0%, #26c6da 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.hero-content {
    max-width: 800px;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.btn-primary {
    background: white;
    color: #00bcd4;
}

.btn-primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
}

.btn-secondary:hover {
    background: white;
    color: #00bcd4;
    transform: translateY(-2px);
}

/* Tools Grid Section */
.tools-section {
    padding: 6rem 0;
    background: #f8f9fa;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.main-search-input {
    padding: 1rem 2rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1.1rem;
    width: 400px;
    max-width: 100%;
    margin-right: 1rem;
}

.main-search-input:focus {
    outline: none;
    border-color: #00bcd4;
}

.search-btn {
    padding: 1rem 1.5rem;
    background: #00bcd4;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.tool-card,
.tool-card-placeholder {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-card:hover,
.tool-card-placeholder:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.15);
    border-color: #00bcd4;
}

.tool-card-placeholder a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #00bcd4;
}

.tool-card h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.tool-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.tool-link {
    background: #00bcd4;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.tool-link:hover {
    background: #26c6da;
    transform: translateY(-2px);
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-item {
    padding: 0.5rem 0;
    color: #333;
    font-weight: 500;
}

.about-stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stat-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border-left: 4px solid #00bcd4;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #00bcd4;
    font-family: 'Playfair Display', serif;
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: #666;
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tool Page Styles */
.tool-page {
    padding: 8rem 0 4rem;
    min-height: 100vh;
    background: #f8f9fa;
}

.breadcrumb {
    margin-bottom: 2rem;
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #00bcd4;
    text-decoration: none;
}

.tool-header {
    text-align: center;
    margin-bottom: 3rem;
}

.tool-header h1 {
    font-family: 'Playfair Display', serif;
    color: #333;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-header p {
    font-size: 1.2rem;
    color: #666;
}

.tool-converter {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.file-upload {
    border: 2px dashed #00bcd4;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    background: #f8f9fa;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.upload-icon {
    font-size: 3rem;
    color: #00bcd4;
    margin-bottom: 1rem;
}

.file-upload h3 {
    color: #333;
    margin-bottom: 0.5rem;
}

.file-upload p {
    color: #666;
    margin-bottom: 1.5rem;
}

.file-input-wrapper {
    position: relative;
    width: 100%;
    height: 50px;
    border: 2px solid #00bcd4;
    border-radius: 10px;
    background: rgba(0, 188, 212, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 1rem;
    overflow: hidden;
}

.file-input-wrapper:hover {
    background: rgba(0, 188, 212, 0.2);
}

.file-input-wrapper::after {
    content: 'Click to select files';
    color: #00bcd4;
    font-weight: 600;
    pointer-events: none;
    z-index: 1;
}

#fileInput,
input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
    border: none;
    outline: none;
}

#fileInfo {
    background: #e8f5e8;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid #4caf50;
}

#progressContainer {
    margin: 1rem 0;
}

#progressBar {
    height: 8px;
    background: linear-gradient(90deg, #00bcd4, #26c6da);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.convert-btn {
    background: #00bcd4;
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.convert-btn:hover {
    background: #26c6da;
    transform: translateY(-2px);
}

.convert-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand h3 {
    color: #00bcd4;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00bcd4;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #999;
}

/* Ad Banner */
.ad-banner {
    text-align: center;
    padding: 2rem 0;
    background: #f8f9fa;
    margin: 2rem 0;
    border-radius: 10px;
}

.disclaimer-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(0, 188, 212, 0.05);
    border-radius: 10px;
    border-left: 4px solid #00bcd4;
}

.disclaimer-section h2 {
    color: #00bcd4;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.disclaimer-section ul {
    list-style: none;
    padding-left: 0;
}

.disclaimer-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 188, 212, 0.1);
    position: relative;
    padding-left: 1.5rem;
}

.disclaimer-section li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00bcd4;
    font-weight: bold;
}

.disclaimer-section p {
    line-height: 1.6;
    color: #333;
}

.disclaimer-section a {
    color: #00bcd4;
    text-decoration: none;
    font-weight: 500;
}

.disclaimer-section a:hover {
    text-decoration: underline;
}

.preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.preview-panel {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1rem;
}

.preview-panel h4 {
    color: #00bcd4;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #00bcd4;
    padding-bottom: 0.5rem;
}

.code-preview {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.conversion-progress {
    background: rgba(0, 188, 212, 0.1);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    margin: 2rem 0;
    border: 2px solid rgba(0, 188, 212, 0.3);
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    position: relative;
}

.progress-step {
    background: #00bcd4;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    position: relative;
    z-index: 2;
}

.progress-step.completed {
    background: #4caf50;
}

.progress-step.active {
    background: #ff9800;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.progress-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e0e0e0;
    z-index: 1;
}

.progress-line-fill {
    height: 100%;
    background: #4caf50;
    width: 0%;
    transition: width 0.5s ease;
}

.compression-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.compression-btn {
    padding: 0.8rem 1.5rem;
    border: 2px solid #00bcd4;
    background: white;
    color: #00bcd4;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.compression-btn:hover {
    background: #00bcd4;
    color: white;
}

.compression-btn.selected {
    background: #00bcd4;
    color: white;
}

.page-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    max-height: 500px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.page-thumb {
    border: 3px solid transparent;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    position: relative;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.page-thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.page-thumb:hover {
    border-color: #00bcd4;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 188, 212, 0.3);
}

.page-thumb:hover::before {
    transform: translateX(100%);
}

.page-thumb.selected {
    border-color: #4caf50;
    background: linear-gradient(145deg, #e8f5e8, #c8e6c9);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.4);
}

.page-preview-image {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.rotate-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.rotate-btn {
    background: linear-gradient(45deg, #00bcd4, #26c6da);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.3);
}

.rotate-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.5);
}

.page-number {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.page-checkbox {
    transform: scale(1.2);
    margin-top: 0.5rem;
}

.page-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.page-controls button {
    padding: 0.5rem 1rem;
    border: 1px solid #00bcd4;
    background: white;
    color: #00bcd4;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
}

.page-controls button:hover {
    background: #00bcd4;
    color: white;
}

.luxury-btn {
    background: linear-gradient(45deg, #00bcd4, #26c6da);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
    margin: 0 0.5rem;
}

.luxury-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.format-card {
    background: linear-gradient(145deg, #ffffff, #f1f3f4);
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.format-card:hover {
    border-color: #00bcd4;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.2);
}

.format-quality {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00bcd4;
    margin-bottom: 0.5rem;
}

.format-size {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.download-format-btn {
    background: linear-gradient(45deg, #4caf50, #66bb6a);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-format-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.youtube-input-section {
    background: linear-gradient(135deg, #00bcd4, #26c6da);
    padding: 2rem;
    border-radius: 15px;
    color: white;
    text-align: center;
}

.youtube-input-section h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.url-input-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.video-preview-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.video-thumbnail {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-details h3 {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.video-details p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.video-stats {
    display: flex;
    gap: 1rem;
    color: #888;
    font-size: 0.9rem;
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.format-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.format-section h4 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid #00bcd4;
    padding-bottom: 0.5rem;
}

.format-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.format-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.format-item:hover {
    border-color: #00bcd4;
    box-shadow: 0 2px 8px rgba(0, 188, 212, 0.2);
}

.format-info {
    display: flex;
    flex-direction: column;
}

.format-quality {
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.format-details {
    color: #666;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.download-btn {
    background: #4caf50;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .video-preview-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
}

.w3schools-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.w3schools-panel {
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.w3schools-header {
    background: #04aa6d;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.w3schools-header h4 {
    margin: 0;
    font-size: 1rem;
}

.copy-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.3);
}

.w3schools-code {
    background: #ffffff;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-x: auto;
    min-height: 300px;
    white-space: pre-wrap;
    border-left: 4px solid #04aa6d;
}

.w3schools-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.w3schools-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.run-btn {
    background: #04aa6d;
    color: white;
}

.run-btn:hover {
    background: #059862;
    transform: translateY(-2px);
}

.download-btn {
    background: #2196f3;
    color: white;
}

.download-btn:hover {
    background: #1976d2;
    transform: translateY(-2px);
}

.pdf-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.pdf-page-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.pdf-page-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.2);
    border: 2px solid #00bcd4;
}

.pdf-page-card.selected {
    border: 3px solid #4caf50;
    background: linear-gradient(145deg, #e8f5e8, #c8e6c9);
    transform: translateY(-3px);
}

.pdf-page-preview {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    position: relative;
    overflow: hidden;
}

.pdf-page-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="40" fill="white">📄</text></svg>') center/contain no-repeat;
}

.pdf-page-info {
    text-align: center;
}

.pdf-page-number {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.pdf-page-content {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
    margin-bottom: 1rem;
    height: 60px;
    overflow: hidden;
}

.pdf-page-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.download-success {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 15px;
    border: 1px solid #e0e0e0;
}

.success-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.download-btn-primary {
    background: linear-gradient(135deg, #00bcd4, #26c6da);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
    margin: 1rem 0;
}

.download-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.file-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.tool-converter {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
}

.file-upload {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 2px dashed #00bcd4;
    border-radius: 15px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.file-upload:hover {
    border-color: #26c6da;
    background: linear-gradient(135deg, #e0f7fa, #f8f9fa);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.15);
}

.upload-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.convert-btn {
    background: linear-gradient(135deg, #00bcd4, #26c6da);
    color: white;
    border: none;
    padding: 1rem 3rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
    margin: 2rem auto;
    display: block;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 188, 212, 0.4);
}

.convert-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.api-status {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.api-badge, .quality-badge {
    background: linear-gradient(135deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}

.quality-badge {
    background: linear-gradient(135deg, #00bcd4, #26c6da);
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .w3schools-container {
        grid-template-columns: 1fr;
    }
    
    .pdf-page-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .pdf-page-preview {
        height: 150px;
    }
    
    .file-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .api-status {
        flex-direction: column;
        align-items: center;
    }
}

.ai-preview-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.image-preview {
    width: 100%;
    height: 300px;
    background: #2d3748;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 1.1rem;
    border: 2px dashed #4a5568;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.image-preview:hover {
    border-color: #00bcd4;
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.3);
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.ai-controls {
    background: rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 15px;
    margin-top: 1rem;
    backdrop-filter: blur(10px);
}

.quality-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quality-selector label {
    color: #00bcd4;
    font-weight: 600;
}

.quality-selector select {
    background: #2d3748;
    color: white;
    border: 2px solid #4a5568;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

.tts-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
    border-radius: 20px;
    color: white;
}

.voice-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-weight: 600;
    color: #e2e8f0;
}

.control-group select,
.control-group input[type="range"] {
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    padding: 0.5rem;
    color: white;
}

.text-input-area textarea {
    width: 100%;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 15px;
    padding: 1rem;
    color: white;
    font-size: 1rem;
    resize: vertical;
}

.text-input-area textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

.audio-preview {
    margin-top: 1rem;
}

.ai-processing {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 188, 212, 0.9);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}

@media (max-width: 768px) {
    .preview-container {
        grid-template-columns: 1fr;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-line {
        display: none;
    }
    
    .compression-buttons {
        flex-direction: column;
    }
    
    .page-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input {
        width: 250px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .main-search-input {
        width: 100%;
        margin-bottom: 1rem;
    }
}

.convert-btn,
.w3schools-btn.download-btn {
    background-color: #d4af37;
    color: #000;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.convert-btn:hover,
.w3schools-btn.download-btn:hover {
    background-color: #b99a30;
}