* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header-ads {
    background: #fff;
    padding: 10px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    min-height: 90px;
}

.nav-links {
    background: #fff;
    padding: 15px 20px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.nav-link {
    padding: 10px 20px;
    background: #f1f3f4;
    color: #5f6368;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    background: #1a73e8;
    color: white;
}

.nav-link.active {
    background: #1a73e8;
    color: white;
}

.nav-link.active.image-page {
    background: #ea4335;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 48px;
    font-weight: 300;
    color: #202124;
    margin-bottom: 30px;
    text-align: center;
}

.logo span {
    color: #1a73e8;
}

.logo.image-logo span {
    color: #ea4335;
}

.input-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 24px;
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
    padding: 20px;
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    color: #5f6368;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
}

.tab:hover {
    color: #1a73e8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

input[type="text"],
input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #dfe1e5;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s;
}

input[type="text"]:focus,
input[type="file"]:focus {
    border-color: #1a73e8;
    box-shadow: 0 1px 6px rgba(26,115,232,0.3);
}

.file-input-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-input-label {
    display: block;
    padding: 12px;
    background: #f1f3f4;
    border: 2px dashed #dadce0;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-label:hover {
    background: #e8eaed;
    border-color: #1a73e8;
}

.file-name {
    margin-top: 10px;
    font-size: 14px;
    color: #5f6368;
}

.convert-btn {
    width: 100%;
    padding: 12px 24px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.convert-btn:hover {
    background: #1557b0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.convert-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

.convert-btn.image-btn {
    background: #ea4335;
}

.convert-btn.image-btn:hover {
    background: #c5221f;
}

.progress-container {
    width: 100%;
    max-width: 600px;
    display: none;
    margin-top: 20px;
}

.progress-container.active {
    display: block;
}

.progress-bar-wrapper {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: #1a73e8;
    width: 0%;
    transition: width 0.3s;
}

.progress-bar.image-progress {
    background: #ea4335;
}

.progress-text {
    text-align: center;
    color: #5f6368;
    font-size: 14px;
}

.result-container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(32,33,36,0.28);
    padding: 20px;
    display: none;
    margin-top: 20px;
}

.result-container.active {
    display: block;
}

.download-btn {
    width: 100%;
    padding: 12px 24px;
    background: #34a853;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.3s;
}

.download-btn:hover {
    background: #2d8e47;
}

.sidebar-ads {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-top: 20px;
    text-align: center;
    min-height: 250px;
}

.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    color: #5f6368;
    font-size: 14px;
    border-top: 1px solid #e0e0e0;
}

.error {
    background: #fce8e6;
    color: #c5221f;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    display: none;
}

.error.active {
    display: block;
}

.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-btn {
    padding: 6px 12px;
    border: none;
    background: #f1f3f4;
    color: #5f6368;
    border-radius: 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.lang-btn:hover {
    background: #e8eaed;
}

.lang-btn.active {
    background: #1a73e8;
    color: white;
}

/* Image converter specific styles */
.format-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.format-btn {
    flex: 1;
    padding: 15px;
    border: 2px solid #e0e0e0;
    background: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #5f6368;
    border-radius: 12px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.format-btn:hover {
    border-color: #ea4335;
    color: #ea4335;
}

.format-btn.active {
    background: #ea4335;
    color: white;
    border-color: #ea4335;
}

.format-icon {
    font-size: 24px;
}

@media (max-width: 768px) {
    .logo {
        font-size: 36px;
    }
    
    .input-container {
        border-radius: 16px;
        padding: 15px;
    }
    
    .nav-links {
        gap: 10px;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 8px 15px;
    }
}
