* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Comic Neue', cursive;
    background: #f8f8f8; /* Light gray notebook color */
    background-image: 
        linear-gradient(90deg, transparent 0px, transparent 39px, #e0e0e0 40px, #e0e0e0 41px, transparent 42px),
        linear-gradient(0deg, transparent 0px, transparent 39px, #e0e0e0 40px, #e0e0e0 41px, transparent 42px);
    background-size: 42px 42px;
    height: 100vh;
    color: #333;
    position: relative;
    overflow: hidden;
}

/* Add black horizontal lines like notebook */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, transparent 0px, transparent 39px, #000 40px, #000 41px, transparent 42px);
    background-size: 42px 42px;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header {
    background: #000;
    padding: 15px;
    border-radius: 15px;
    margin: 0 20px 20px 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #fff;
    object-fit: cover;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.logo-image:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.header-text {
    flex: 1;
    text-align: center;
}

.title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 8px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.subtitle {
    font-size: 1rem;
    color: #fff;
    opacity: 0.9;
    font-style: italic;
}

.search-section {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    border: 2px solid #333;
    position: relative;
    flex-shrink: 0;
}



.input-group {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.username-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: 2px solid #333;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.username-input:focus {
    border-color: #000;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    transform: scale(1.01);
}

.check-btn {
    padding: 15px 25px;
    background: #000;
    color: white;
    border: 2px solid #333;
    border-radius: 10px;
    font-size: 1.1rem;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.check-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    background: #333;
}

.check-btn:active {
    transform: translateY(0);
}

.loading {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.loading p {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.results {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid #333;
    animation: slideUp 0.5s ease-out;
    position: relative;
    flex: 1;
    margin-bottom: 15px;
}



.profile-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    height: 100%;
    z-index: 2;
    position: relative;
}

.avatar-section {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.avatar-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: var(--avatar-bg-image, none);
    background-size: cover;
    background-position: right;
    background-repeat: no-repeat;
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #000;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
    position: relative;
    z-index: 2;
}

.avatar:hover {
    transform: scale(1.1) rotate(5deg);
}

.username-display h2 {
    color: #333;
    font-size: 1.4rem;
    margin-bottom: 10px;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.avatar-section .iq-message {
    margin-top: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    justify-content: center;
    height: 100%;
    z-index: 2;
    position: relative;
}

.iq-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.iq-score {
    text-align: center;
    padding: 20px;
    background: #000;
    border-radius: 15px;
    color: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    border: 2px solid #333;
    width: 100%;
}

.score-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 5px;
    opacity: 0.9;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
    margin-top: 5px;
}

.iq-chart {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #e9ecef;
    width: 100%;
}

.chart-container {
    position: relative;
}

.chart-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
    position: relative;
}

.chart-fill {
    height: 100%;
    background: linear-gradient(90deg, #000, #333);
    border-radius: 20px;
    transition: width 1s ease-out;
    position: relative;
    overflow: hidden;
}

.chart-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #666;
    font-weight: 600;
}

.iq-message {
    text-align: center;
    padding: 15px;
    background: #f0f0f0;
    border: 2px solid #ccc;
    border-radius: 15px;
    font-size: 1rem;
    color: #333;
    font-style: italic;
    width: 100%;
}

.error {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    color: #000;
    font-size: 1.1rem;
    border: 2px solid #333;
    animation: shake 0.5s ease-in-out;
    flex-shrink: 0;
}

footer {
    text-align: center;
    color: #333;
    font-style: italic;
    position: relative;
    flex-shrink: 0;
}





.hidden {
    display: none;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}



@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        padding: 15px;
        height: auto;
        min-height: 100vh;
    }
    
    .title {
        font-size: 2rem;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .logo-image {
        width: 80px;
        height: 80px;
    }
    
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 10px;
    }
    
    .iq-background-image {
        width: 100%;
        height: 30%;
        top: auto;
        bottom: 0;
        border-radius: 20px 20px 0 0;
    }
    
    .left-column,
    .right-column {
        gap: 15px;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .username-input {
        min-width: auto;
        width: 100%;
    }
    
    .iq-image {
        max-height: 60px;
    }
    
    .avatar-section .iq-message {
        margin-top: 8px;
        margin-bottom: 8px;
    }
    
    .avatar-section,
    .iq-section {
        padding: 15px;
    }
    
    .avatar {
        width: 80px;
        height: 80px;
    }
    
    .score-number {
        font-size: 2rem;
    }
}

/* IQ Background Image Styling */
.iq-background-image {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 1;
    border-radius: 0 20px 20px 0;
}

/* IQ Image Styling (for hover effects) */
.iq-image {
    max-width: 100%;
    max-height: 100px;
    width: auto;
    height: auto;
    border-radius: 12px;
    border: 2px solid #333;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
    transition: transform 0.3s ease;
    object-fit: contain;
}

.iq-image:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

/* Twitter Share Buttons */
.share-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.twitter-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1DA1F2;
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
    border: 2px solid #1DA1F2;
}

.twitter-share-btn:hover {
    background: #0d8bd9;
    border-color: #0d8bd9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.4);
}

.twitter-share-btn:active {
    transform: translateY(0);
}

.twitter-icon {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Responsive adjustments for share buttons */
@media (max-width: 768px) {
    .share-buttons {
        top: 10px;
        right: 10px;
    }
    
    .twitter-share-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .twitter-icon {
        width: 16px;
        height: 16px;
    }
}

