/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f172a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Main Header */
.main-header {
    background: #1e293b;
    border-bottom: 1px solid #334155;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #60a5fa;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo svg {
    color: #60a5fa;
}

.header-nav a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.header-nav a:hover {
    background: #334155;
    color: #60a5fa;
}

/* Container */
.container {
    width: 100%;
    margin: 0 auto;
    padding: 40px 0;
    flex: 1;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 40px 20px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 16px;
    border: 1px solid #475569;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
}

/* .header-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.header-icon svg {
    color: #60a5fa;
} */

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.2rem;
    color: #94a3b8;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Main content */
main {
    display: flex;
    flex-direction: column;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
}

.current-ip-section {
    background: #1e293b;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid #334155;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #f1f5f9;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.section-header h2::before {
    content: "●";
    color: #22c55e;
    font-size: 1rem;
}

.section-header button {
    min-width: 140px;
    padding: 12px 24px;
    font-size: 0.95rem;
}

/* IP Grid */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Medium screens: 2 columns, then single column */
@media (max-width: 1024px) {
    .ip-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile screens: single column */
@media (max-width: 768px) {
    .ip-grid {
        grid-template-columns: 1fr;
    }
}

.ip-card {
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ip-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ip-card:hover::before {
    opacity: 1;
}

.ip-card:hover {
    transform: translateY(-4px);
    border-color: #475569;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.ip-card h3 {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ip-content {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ip-address-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #334155;
    border-radius: 8px;
    padding: 16px 20px;
    border: 1px solid #475569;
    transition: all 0.2s ease;
    width: 100%;
}

.ip-address-container:hover {
    border-color: #60a5fa;
    background: #475569;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.2);
}

.ip-address {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f1f5f9;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: transparent;
    padding: 0;
    border: none;
    margin: 0;
    flex: 1;
    text-align: left;
}

.copy-btn {
    background: transparent;
    color: #94a3b8;
    border: none;
    padding: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    opacity: 0.7;
}

.copy-btn:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.1);
    opacity: 1;
    transform: scale(1.1);
}

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

.copy-btn svg {
    width: 16px;
    height: 16px;
}

/* Loading and error states */
.loading {
    color: #94a3b8;
    font-style: italic;
    animation: pulse 1.5s ease-in-out infinite;
    font-size: 1.1rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }
}

.error {
    color: #94a3b8;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    background: #334155;
    padding: 16px 20px;
    border-radius: 8px;
    border: 1px solid #475569;
    font-style: italic;
    white-space: nowrap;
}


button {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
    border: 1px solid #2563eb;
}

button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

button:active {
    transform: translateY(0);
}


/* Main Footer */
.main-footer {
    background: #1e293b;
    border-top: 1px solid #334155;
    margin-top: auto;
}

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

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

.footer-section h4 {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #3b82f6;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #334155;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.9rem;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(5, 150, 105, 0.3);
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
    font-weight: 500;
    max-width: 350px;
    word-wrap: break-word;
    border: 1px solid #065f46;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }

    .header-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .page-header {
        padding: 40px 20px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .page-header p {
        font-size: 1.1rem;
    }

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

    .controls {
        flex-direction: column;
        align-items: center;
    }

    button {
        width: 100%;
        max-width: 300px;
    }

    #status-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-header h1 {
        font-size: 1.8rem;
    }

    .current-ip-section {
        padding: 24px;
    }

    .ip-card {
        padding: 20px;
    }

    .ip-address {
        font-size: 1.1rem;
    }

    .ip-address-container {
        padding: 12px 16px;
    }
}

/* Additional animations */
.ip-card {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling for dark theme */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}