/**
 * What My IP - Modern Dark Theme Stylesheet
 * Responsive design with card-based layout
 */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 1.1rem;
    color: #b0b0b0;
    font-weight: 300;
}

/* Main Content */
main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Cards Grid - Two Column Layout */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Card Styles */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-label-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

/* IP Card Label - Centered */
.ip-card .card-label-wrapper {
    justify-content: center;
}

.card-label {
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #888;
    font-weight: 600;
}

/* Info Button */
.info-btn {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}

.info-btn:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.info-btn svg {
    display: block;
}

/* Tooltip */
.info-btn[data-tooltip] {
    position: relative;
}

.info-btn[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 6px;
    white-space: normal;
    width: 220px;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.info-btn[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    pointer-events: none;
}

.card-value {
    font-size: 1.1rem;
    color: #e0e0e0;
    word-break: break-word;
}

/* IP Address Card - Special Styling */
.ip-card {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    text-align: center;
    padding: 40px 24px;
}

.ip-address-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.ip-address {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.5);
}

/* Copy Button */
.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(102, 126, 234, 0.5);
    transform: scale(1.1);
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.5);
}

.copy-btn svg {
    display: block;
}

/* Status Cards */
.success-card {
    border-color: rgba(76, 175, 80, 0.3);
    background: rgba(76, 175, 80, 0.1);
}

.warning-card {
    border-color: rgba(255, 152, 0, 0.3);
    background: rgba(255, 152, 0, 0.1);
}

.error-card {
    border-color: rgba(244, 67, 54, 0.3);
    background: rgba(244, 67, 54, 0.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-right: 8px;
}

.badge.clean {
    background: rgba(76, 175, 80, 0.3);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.5);
}

.badge.proxy {
    background: rgba(255, 152, 0, 0.3);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.5);
}

.badge.vpn {
    background: rgba(244, 67, 54, 0.3);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.5);
}

/* Flag Emoji */
.flag {
    font-size: 1.5rem;
    margin-right: 8px;
    vertical-align: middle;
}

/* Browser Info */
.info-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 12px;
    align-items: baseline;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    font-weight: 600;
    color: #aaa;
    margin-right: 8px;
    min-width: 100px;
}

.info-value {
    color: #e0e0e0;
    flex: 1;
}

.info-value.small {
    font-size: 0.9rem;
    color: #bbb;
    font-family: 'Courier New', monospace;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 50px;
    padding: 30px 0;
    color: #888;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .ip-address {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .ip-address-wrapper {
        gap: 10px;
    }
    
    .copy-btn {
        padding: 8px;
    }
    
    .copy-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .card {
        padding: 20px;
    }
    
    .card-value {
        font-size: 1rem;
    }
    
    .info-label {
        min-width: 80px;
        font-size: 0.9rem;
    }
    
    .info-value.small {
        font-size: 0.8rem;
    }
    
    .info-btn[data-tooltip]:hover::after {
        width: 180px;
        font-size: 0.7rem;
        left: auto;
        right: 0;
        transform: none;
    }
    
    .info-btn[data-tooltip]:hover::before {
        left: auto;
        right: 10px;
        transform: none;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.75rem;
    }
    
    .ip-address {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 16px;
    }
    
    .info-row {
        flex-direction: column;
    }
    
    .info-label {
        margin-bottom: 4px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: rgba(102, 126, 234, 0.3);
    color: #fff;
}

