/* YouTube Subscriber Count Styles */
:root {
    --youtube-red: #ff0000;
    --youtube-dark-red: #cc0000;
    --bg-dark: #0a0a0a;
    --bg-darker: #050505;
    --text-light: #ffffff;
    --text-gray: #cccccc;
    --border-color: #333;
    --card-bg: rgba(255, 255, 255, 0.05);
    --electric-blue: #00FFFF;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
}

.main-content {
    padding: 120px 2rem 4rem;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
}

.subcount-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Styles */
.subcount-header {
    text-align: center;
    margin-bottom: 3rem;
}

.subcount-header h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    color: var(--youtube-red);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.subcount-header p {
    font-size: 1.2rem;
    color: var(--text-gray);
}

/* Search Section */
.search-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.search-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-family: 'Orbitron', monospace;
}

.search-input-container {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-input {
    flex: 1;
    padding: 1rem 1rem 1rem 3rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--youtube-red);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
    font-size: 1.1rem;
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(45deg, var(--youtube-red), var(--youtube-dark-red));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.3);
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 4rem 2rem;
}

.loading-spinner {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 0, 0, 0.2);
    border-top: 4px solid var(--youtube-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Channel Selection */
.channel-selection {
    margin-bottom: 2rem;
}

.channel-selection h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-light);
    font-family: 'Orbitron', monospace;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.channel-option {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.channel-option:hover {
    border-color: var(--youtube-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.2);
}

.channel-option img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--youtube-red);
}

.channel-option-info h3 {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.channel-option-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Counter Display */
.counter-display {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.channel-info {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
}

.channel-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--youtube-red);
}

.channel-details {
    flex: 1;
}

.channel-details h2 {
    font-family: 'Orbitron', monospace;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.channel-details p {
    color: var(--text-gray);
    font-size: 1rem;
}

.new-search-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.new-search-btn:hover {
    background: var(--youtube-red);
    border-color: var(--youtube-red);
}

/* Main Counter */
.main-counter {
    background: linear-gradient(135deg, var(--card-bg), rgba(255, 0, 0, 0.05));
    border: 2px solid var(--youtube-red);
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.2);
}

.youtube-logo {
    font-size: 4rem;
    color: var(--youtube-red);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.counter-section {
    flex: 1;
}

.subscriber-count {
    font-family: 'Orbitron', monospace;
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--youtube-red);
    text-shadow: 0 0 30px rgba(255, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    animation: countGlow 3s ease-in-out infinite;
}

@keyframes countGlow {
    0%, 100% { text-shadow: 0 0 30px rgba(255, 0, 0, 0.5); }
    50% { text-shadow: 0 0 50px rgba(255, 0, 0, 0.8), 0 0 60px rgba(255, 0, 0, 0.6); }
}

.counter-label {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: var(--youtube-red);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 0, 0, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--youtube-red), var(--youtube-dark-red));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-number {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Graph Container */
.graph-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    backdrop-filter: blur(10px);
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.graph-header h3 {
    font-family: 'Orbitron', monospace;
    color: var(--text-light);
    font-size: 1.3rem;
}

.graph-controls {
    display: flex;
    gap: 0.5rem;
}

.time-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.time-btn:hover, .time-btn.active {
    background: var(--youtube-red);
    border-color: var(--youtube-red);
    color: white;
}

.graph-content {
    width: 100%;
    height: 300px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#subscriberGraph {
    max-width: 100%;
    max-height: 100%;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.action-btn:hover {
    background: var(--youtube-red);
    border-color: var(--youtube-red);
    transform: translateY(-2px);
}

.refresh-btn:hover {
    background: var(--electric-blue);
    border-color: var(--electric-blue);
    color: var(--bg-dark);
}

/* Error Display */
.error-display {
    text-align: center;
    padding: 4rem 2rem;
}

.error-content {
    background: var(--card-bg);
    border: 1px solid #ff4444;
    border-radius: 15px;
    padding: 3rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.error-content i {
    font-size: 3rem;
    color: #ff4444;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
}

.error-content p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.retry-btn {
    padding: 1rem 2rem;
    background: #ff4444;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.retry-btn:hover {
    background: #cc0000;
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-content {
        padding: 100px 1rem 2rem;
    }

    .subcount-header h1 {
        font-size: 2rem;
    }

    .search-input-container {
        flex-direction: column;
        gap: 1rem;
    }

    .search-input {
        padding: 1rem;
    }

    .search-icon {
        display: none;
    }

    .main-counter {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
    }

    .subscriber-count {
        font-size: 2.5rem;
    }

    .channel-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .graph-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

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

    .action-btn {
        width: 100%;
        max-width: 300px;
    }
}

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

    .subscriber-count {
        font-size: 2rem;
    }

    .youtube-logo {
        font-size: 3rem;
    }
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0D1117, #161B22);
    color: #E6EDF3;
    min-height: 100vh;
    padding: 20px;
}

/* Home Button */
.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #00FFFF, #FF6B35);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0D1117;
    text-decoration: none;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

.home-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 255, 0.5);
}

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

/* Header */
.header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo i {
    font-size: 3rem;
    color: #FF0000;
}

.logo h1 {
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    background: linear-gradient(135deg, #FF0000, #00FFFF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #7D8590;
    font-size: 1.1rem;
}

/* Search Section */
.search-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
}

.search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

#channelInput {
    flex: 1;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(240, 246, 252, 0.1);
    border-radius: 25px;
    color: #E6EDF3;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#channelInput:focus {
    outline: none;
    border-color: #00FFFF;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

#channelInput::placeholder {
    color: #7D8590;
}

#searchBtn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #FF0000, #FF4444);
    border: none;
    border-radius: 25px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

#searchBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.popular-channels h3 {
    color: #00FFFF;
    margin-bottom: 1rem;
    font-family: 'Orbitron', monospace;
}

.channel-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.channel-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 20px;
    color: #E6EDF3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.channel-btn:hover {
    background: rgba(0, 255, 255, 0.1);
    border-color: #00FFFF;
    transform: translateY(-2px);
}

/* Stats Container */
.stats-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.channel-info {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.channel-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #00FFFF;
}

.channel-details h2 {
    color: #00FFFF;
    font-family: 'Orbitron', monospace;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.channel-details p {
    color: #7D8590;
    line-height: 1.6;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(240, 246, 252, 0.1);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.stat-card.subscribers {
    border-left: 4px solid #FF0000;
}

.stat-card.views {
    border-left: 4px solid #00FF00;
}

.stat-card.videos {
    border-left: 4px solid #00FFFF;
}

.stat-card.joined {
    border-left: 4px solid #FF6B35;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.subscribers .stat-icon {
    background: rgba(255, 0, 0, 0.1);
    color: #FF0000;
}

.views .stat-icon {
    background: rgba(0, 255, 0, 0.1);
    color: #00FF00;
}

.videos .stat-icon {
    background: rgba(0, 255, 255, 0.1);
    color: #00FFFF;
}

.joined .stat-icon {
    background: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
}

.stat-info h3 {
    color: #7D8590;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #E6EDF3;
    font-family: 'Orbitron', monospace;
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.8rem;
    color: #28a745;
    font-weight: 500;
}

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 15px;
    color: #FF4444;
    font-weight: 600;
}

.pulse {
    width: 12px;
    height: 12px;
    background: #FF0000;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

/* Flash Animation */
@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; transform: scale(1.05); }
}

/* Error Message */
.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-message i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 60px 10px 20px;
    }
    
    .logo h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    .channel-buttons {
        justify-content: center;
    }
    
    .channel-info {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        flex-direction: column;
    }
    
    .logo i {
        font-size: 2rem;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
    
    .channel-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .channel-details h2 {
        font-size: 1.5rem;
    }
}
