:root {
    --primary-color: #4a90e2;
    --hover-color: #357abd;
    --background-color: #f5f7fa;
    --card-background: #ffffff;
    --text-color: #2c3e50;
}

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

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

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

.main-header {
        position: relative;
        padding: 0px 0 25px 0;
        margin-bottom: 20px;
        min-height: 60px;
        display: flex;
        align-items: center;
    }
    
    .header-left {
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        text-align: left;
        line-height: 1;
    }
    
    .header-center {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: auto;
        z-index: 1;
    }
    
    .header-right {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    .header-left h1 {
        font-size: 2.2em;
        margin: 0 0 5px 0;
        background: var(--primary-color);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        font-weight: 700;
        white-space: nowrap;
    }
    
    .header-left .subtitle {
        font-size: 0.9em;
        color: #666;
        margin: 0;
        font-weight: 400;
        white-space: nowrap;
    }
    
    /* IP Info Block - now in header */
    .ip-info {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #fff;
        border: 2px solid #f0f0f0;
        padding: 12px 18px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        color: #333;
        font-family: inherit;
        transition: all 0.3s ease;
        white-space: nowrap;
    }
    
    .ip-info:hover {
        border-color: #667eea;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    }
    
    .ip-label {
        font-weight: 500;
        font-size: 14px;
        color: #666;
    }
    
    .ip-address {
        font-family: 'Courier New', monospace;
        font-weight: 600;
        font-size: 15px;
        color: #333;
        background: #f8f9fa;
        padding: 6px 10px;
        border-radius: 6px;
        border: 1px solid #e9ecef;
    }
    
    .country-code {
        background: var(--primary-color);
        color: white;
        padding: 4px 8px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .copy-btn {
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        color: #666;
        padding: 8px 10px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 14px;
    }
    
    .copy-btn:hover {
        background: #667eea;
        color: white;
        border-color: #667eea;
        transform: translateY(-1px);
    }
    
    .copy-btn:active {
        transform: translateY(0);
    }
    
    @media (max-width: 768px) {
        .main-header {
            position: static;
            display: flex;
            flex-direction: column;
            gap: 15px;
            text-align: center;
            padding: 15px 0 20px 0;
            min-height: auto;
        }
        
        .header-left,
        .header-center,
        .header-right {
            position: static;
            transform: none;
        }
        
        .header-left {
            text-align: center;
        }
        
        .header-left h1 {
            font-size: 1.8em;
        }
        
        .header-left .subtitle {
            font-size: 0.85em;
        }
        
        .header-center {
            width: 100%;
            display: flex;
            justify-content: center;
        }
        
        .header-right {
            width: auto;
        }
        
        .ip-info {
            flex-wrap: wrap;
            gap: 10px;
            padding: 12px 15px;
            justify-content: center;
        }
        
        .ip-label {
            font-size: 13px;
        }
        
        .ip-address {
            font-size: 14px;
        }
    }
    
    @media (max-width: 480px) {
        .main-header {
            padding: 10px 0 15px 0;
        }
        
        .header-left h1 {
            font-size: 1.6em;
        }
        
        .ip-info {
            gap: 8px;
            padding: 10px 12px;
        }
        
        .ip-label {
            font-size: 12px;
        }
        
        .ip-address {
            font-size: 13px;
            padding: 5px 8px;
        }
        
        .country-code {
            font-size: 10px;
            padding: 3px 6px;
        }
        
        .copy-btn {
            padding: 6px 8px;
            font-size: 12px;
        }
    }

h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

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

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

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

.tool-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tool-description {
    color: #666;
    font-size: 0.95rem;
}

footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem 0;
    color: #666;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }
}