/* style.css */
:root {
    --primary: #4285F4;
    --secondary: #34A853;
    --accent: #EA4335;
    --light: #f8f9fa;
    --dark: #202124;
    --gray: #5f6368;
    --yellow: #FBBC05;
}

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

body {
    font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

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

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo span {
    color: var(--accent);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--primary);
}

/* Main Content */
main {
    min-height: 70vh;
    padding: 40px 0;
}

.tool-header {
    text-align: center;
    margin-bottom: 30px;
}

.tool-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.tool-header p {
    font-size: 1rem;
    color: var(--gray);
    max-width: 700px;
    margin: 0 auto;
}

.tool-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Tool Container */
.tool-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

/* Form Elements */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

/* Buttons */
.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 10px;
    margin-bottom: 10px;
}

.btn:hover {
    background: #3367d6;
}

.btn-secondary {
    background: var(--gray);
}

.btn-secondary:hover {
    background: #4e5257;
}

.btn-accent {
    background: var(--accent);
}

.btn-accent:hover {
    background: #d33426;
}

.btn-success {
    background: var(--secondary);
}

.btn-success:hover {
    background: #2d9246;
}

/* Results */
.result-container {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-top: 20px;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    margin: 10px 0;
}

/* Status Messages */
.status-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    display: none;
}

.status-success {
    background-color: #e6f4ea;
    color: var(--secondary);
    border: 1px solid #b7e1c1;
    display: block;
}

.status-error {
    background-color: #fce8e6;
    color: var(--accent);
    border: 1px solid #f4b8b1;
    display: block;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #bdc1c6;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #bdc1c6;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 10px;
    }
    
    .tool-header h1 {
        font-size: 1.8rem;
    }
}

/* Special tool styles */
/* For calculators */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* For image tools */
.image-preview {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* For JSON/Code tools */
.code-container {
    font-family: 'Courier New', monospace;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
}

/* For QR Code */
.qr-code-container {
    text-align: center;
    margin: 20px 0;
}

#qrCode {
    margin: 0 auto;
}

/* For password generator */
.password-strength {
    height: 5px;
    background-color: #eee;
    margin-top: 10px;
    border-radius: 5px;
    overflow: hidden;
}

.strength-meter {
    height: 100%;
    width: 0%;
    transition: width 0.3s, background-color 0.3s;
}

/* For speed test */
.speed-test-result {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
}

.speed-test-box {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    flex: 1;
    margin: 0 10px;
}

.speed-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary);
}

.speed-label {
    color: var(--gray);
    font-size: 0.9rem;
}

.progress-container {
    height: 10px;
    background-color: #ecf0f1;
    border-radius: 5px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    width: 0%;
    transition: width 0.3s;
}