/* Card Styles */
.streamer-card-module, .viewer-card-module {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 500px;
    width: fit-content;
    font-size: .9em;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 2px solid var(--primary-color);
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 15px var(--shadow-color);
}

.streamer-card-module:hover, .viewer-card-module:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3), 0 0 25px var(--shadow-color);
}

.card-pfp {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 10px var(--shadow-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-pfp img {
    height: 60px;
    width: 60px;
    min-width: 60px;
    min-height: 60px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.card-top {
    height: 60px;
    width: 100%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px 10px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    color: white;
    font-size: 1.1em;
    font-weight: 700;
    margin: 0;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.card-bottom {
    display: flex;
    flex-direction: column;
    padding: 20px 15px 15px 15px;
    justify-content: center;
    text-align: left;
    background: var(--card-bg-secondary);
    border-radius: 0 0 10px 10px;
    gap: 8px;
}

/* Streamer specific styles */
.streamer-container {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.2em;
    margin-bottom: .5em;
}

.name-section {
    display: flex;
    align-items: center;
    gap: .25em;
}

.streamer-container img {
    height: 1em;
    margin: auto 0;
}

/* Username styling */
#streamer-name, #viewer-name {
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: visible;
}

/* Verified badge styling */
.name-section img {
    height: 1em;
    margin: auto 0;
}

/* Viewer specific styles */
.viewer-name-container {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 1.2em;
    margin-bottom: .5em;
}

/* Before content styles */
#streamer-follower-count::before {
    content: 'Followers: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#streamer-live-status::before {
    content: 'Status: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#streamer-live-status {
    font-weight: 700;
}

#streamer-creation-date::before {
    content: 'Created: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#streamer-age::before {
    content: 'Age: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#streamer-id::before {
    content: 'ID: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#streamer-user-id::before {
    content: 'User ID: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#streamer-chatroom-id::before {
    content: 'Chatroom ID: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

/* Social links */
.streamer-socials {
    display: flex;
    justify-content: center;
    gap: .5em;
    margin-top: 0.3em;
}

.streamer-socials img {
    height: 1.5em;
    width: 1.5em;
    transition: transform 0.3s ease;
}

.streamer-socials a:hover img {
    transform: scale(1.2);
}

#viewer-follows::before {
    content: 'Follows: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#viewer-creation-date::before {
    content: 'Followed: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#viewer-age::before {
    content: 'Follow Age: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#subscriber::before {
    content: 'Subscribed: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#sub-length::before {
    content: 'Sub Length: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#gifted-subs::before {
    content: 'Gifted Subs: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

#banned::before {
    content: 'User Banned: ';
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

/* Badges */
.viewer-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .5em;
    margin-top: 1em;
    flex-wrap: wrap;
}

.viewer-badges img {
    height: 1.5em;
    width: 1.5em;
    transition: transform 0.3s ease;
}

.viewer-badges img:hover {
    transform: scale(1.1);
}

.badges-text {
    margin-right: .25em;
    font-weight: 600;
    color: var(--primary-color);
}

/* Look Up Module (Results Section) */
.look-up-module {
    position: relative;
    z-index: 1;
    width: fit-content;
    max-width: 90vw;
    margin: 2rem auto;
    padding: 2rem;
    display: none;
    flex-direction: column; /* Stack items vertically */
    align-items: center;
    gap: 25px;
    background: var(--input-bg);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Container for streamer and viewer cards */
.cards-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    flex-wrap: nowrap;
}

/* Results buttons container for horizontal layout */
.results-buttons-container {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 0 auto 1rem auto;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show buttons container when results are displayed */
.results-container.show .results-buttons-container {
    display: flex;
    opacity: 1;
}

/* Results close button */
.results-close-btn {
    position: relative;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: fit-content;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.results-close-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.results-close-btn:active {
    transform: scale(0.95);
}

.look-up-module.show {
    display: flex;
    opacity: 1;
}

.module-separator {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 1rem;
}

.separator-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(1);
    opacity: 0.8;
    transition: all 0.3s ease;
    transform: rotate(0deg);
}

/* Notice Section */
.notice-section {
    max-width: 600px;
    margin: 1rem auto 0;
    padding: 0 1rem;
}

.notice-content {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.notice-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.notice-content strong {
    color: var(--primary-color);
}

/* Input Section */
.input-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--input-bg);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.input-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.input-group {
    flex: 1;
}

.button-row {
    display: flex;
    justify-content: center;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    background: var(--input-bg-focus);
    color: var(--input-text);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    background: var(--input-bg-focus);
    box-shadow: 0 0 20px var(--shadow-color);
    transform: translateY(-2px);
}

.search-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.search-btn:active {
    transform: translateY(-1px);
}

/* Responsive Design - Mobile */
@media (max-width: 480px) {
    .streamer-card-module, .viewer-card-module {
        min-width: 280px;
        max-width: 100%;
        width: fit-content;
    }
    
    .module-separator {
        margin: 10px 0;
    }
    
    .input-section {
        padding: 1rem;
    }
}

/* Responsive design - Tablet and Mobile */
@media (max-width: 768px) {
    .look-up-module {
        width: fit-content;
        max-width: calc(100vw - 2rem);
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: center;
        gap: 15px;
        padding: 2rem 1.5rem 1.5rem 1.5rem;
        margin: 1rem auto;
    }
    
    /* Rotate connection image when cards stack vertically */
    .look-up-module .separator-image {
        transform: rotate(90deg);
        width: 35px;
        height: 35px;
    }
    
    .results-buttons-container {
        flex-direction: column;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .results-close-btn {
        padding: 0.4rem 1.2rem;
        font-size: 12px;
    }
    
    .input-section {
        margin: 1rem;
        padding: 1.5rem;
        max-width: 600px;
    }
    
    .input-row {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Live Stream Section Styles */
.live-stream-section {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    max-width: 600px;
    width: fit-content;
    font-size: .9em;
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(15px);
    border: 2px solid var(--accent-color);
    transition: all 0.3s ease;
    color: var(--text-primary);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2), 0 0 15px var(--shadow-color);
    margin: 2rem auto 0 auto; /* Top margin, auto horizontal centering */
    align-self: center; /* Center the live stream section */
}

.live-stream-section:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3), 0 0 25px var(--accent-color);
}

.live-stream-section .card-title {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.8),
        0 4px 8px rgba(0, 0, 0, 0.4);
}

.stream-info {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.stream-info h4 {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.stream-details {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9em;
    color: var(--text-secondary);
}

.stream-details > div {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.stream-embed-container {
    position: relative;
    width: 100%;
    height: 315px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stream-embed-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
}

.stream-actions {
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.watch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 25px var(--shadow-color),
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
    0%, 100% { 
        box-shadow: 
            0 8px 25px var(--shadow-color),
            0 4px 15px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% { 
        box-shadow: 
            0 8px 25px var(--shadow-color),
            0 4px 15px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
}

.watch-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.watch-btn:hover::before {
    left: 100%;
}

.watch-btn:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 12px 35px var(--shadow-color),
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.watch-btn:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 
        0 6px 20px var(--shadow-color),
        0 3px 10px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 50%, var(--secondary-color) 100%);
}

.watch-btn:focus {
    outline: none;
    box-shadow: 
        0 8px 25px var(--shadow-color),
        0 4px 15px rgba(0, 0, 0, 0.2),
        0 0 0 3px var(--shadow-color),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.watch-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    background: linear-gradient(135deg, #666 0%, #555 50%, #444 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.watch-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.watch-btn:hover .watch-icon {
    transform: translateX(2px) scale(1.1);
    animation: rocket-boost 0.6s ease-in-out;
}

@keyframes rocket-boost {
    0%, 100% { transform: translateX(2px) scale(1.1); }
    50% { transform: translateX(4px) scale(1.2) rotate(-5deg); }
}

.watch-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.watch-btn:active::after {
    width: 300px;
    height: 300px;
    transition: width 0.2s ease, height 0.2s ease;
}

/* Responsive adjustments for live stream */
@media (max-width: 768px) {
    .look-up-module {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .cards-container {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .live-stream-section {
        max-width: 100%;
        margin: 1rem auto 0 auto;
    }
    
    .stream-embed-container {
        height: 250px;
    }
    
    .stream-details {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stream-details > div {
        text-align: center;
    }
    
    .watch-btn {
        padding: 0.85rem 1.75rem;
        font-size: 1em;
        gap: 0.5rem;
    }
    
    .watch-icon {
        font-size: 1.1em;
    }
}