/* Instagram Insights Page Styles */
.social-insights {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Instagram Authentication Form Styles */
.social-auth-container {
    background: #1e293b;
    border-radius: 12px;
    padding: 2rem;
    margin: 0 auto 2rem;
    max-width: 1000px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.auth-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.back-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    margin-right: 1rem;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
}

.social-auth-container h2 {
    font-size: 2rem;
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

.social-auth-container p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.social-auth-form {
    width: 100%;
}

.auth-form-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.auth-form-field {
    flex: 1;
}

.auth-form-field label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.auth-form-field input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
}

.auth-form-field input:focus {
    border-color: #E1306C;
    box-shadow: 0 0 0 3px rgba(225, 48, 108, 0.1);
    outline: none;
}

.auth-form-field input:hover {
    background: white;
}

.auth-form-field input::placeholder {
    color: #999;
}

.connect-button {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    height: 50px;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
    position: relative;
    overflow: hidden;
}

.connect-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(225, 48, 108, 0.4);
}

.connect-button:active {
    transform: translateY(0);
}

.connect-button i {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.connect-button:hover i {
    transform: scale(1.2);
}

/* Add a subtle shine effect */
.connect-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.connect-button:hover::before {
    left: 100%;
}

/* Platform-specific connect buttons */
.facebook-btn {
    background: #1877F2;
}

.facebook-btn:hover {
    background: #166FE5;
}

.twitter-btn {
    background: #1DA1F2;
}

.twitter-btn:hover {
    background: #1A91DA;
}

.linkedin-btn {
    background: #0A66C2;
}

.linkedin-btn:hover {
    background: #0958A7;
}

.tiktok-btn {
    background: linear-gradient(90deg, #25F4EE, #FE2C55);
}

.tiktok-btn:hover {
    background: linear-gradient(90deg, #20E3DD, #E61A4D);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .auth-form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .connect-button {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* Updated Dashboard Layout */
.insights-dashboard {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header Section */
.insights-header {
    grid-column: span 4;
    background: linear-gradient(to right, #1e293b, #0f172a);
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-image img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    border: 2px solid var(--button-blue);
}

.profile-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.profile-stats {
    display: flex;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Updated Metrics Cards Layout */
.insights-metrics {
    grid-column: span 4;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.metric-card {
    background: linear-gradient(145deg, #1e293b, #162032);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--button-blue), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

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

/* Metric Card Header */
.metric-card h4 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Metric Values */
.metric-value-container {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.metric-value {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(45deg, #fff, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: valueAppear 0.6s cubic-bezier(0.26, 0.54, 0.32, 1) forwards;
    opacity: 0;
    transform: translateY(10px);
}

.metric-change {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.metric-change.positive {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.metric-change.negative {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Chart Container */
.metric-chart {
    height: 80px;
    margin-top: 0.5rem;
    position: relative;
    animation: chartAppear 0.8s ease forwards;
    opacity: 0;
    transform: translateY(10px);
    animation-delay: 0.3s;
}

/* Glow Effects */
.metric-card[data-metric="engagement"] {
    background: linear-gradient(145deg, #1e293b, #162032);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

.metric-card[data-metric="reach"] {
    background: linear-gradient(145deg, #1e293b, #162032);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.1);
}

.metric-card[data-metric="impressions"] {
    background: linear-gradient(145deg, #1e293b, #162032);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.1);
}

.metric-card[data-metric="profile-visits"] {
    background: linear-gradient(145deg, #1e293b, #162032);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.1);
}

/* Animations */
@keyframes valueAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Hover Effects for Charts */
.metric-card:hover .metric-chart {
    animation: pulseChart 2s infinite;
}

@keyframes pulseChart {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .insights-metrics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .insights-metrics {
        grid-template-columns: 1fr;
    }
    
    .metric-card {
        padding: 1.25rem;
    }
    
    .metric-value {
        font-size: 1.75rem;
    }
}

/* Demographics Section */
.audience-card {
    grid-column: span 2;
    background: #1e293b;
    border-radius: 12px;
    padding: 1rem;
}

.demographics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.demographic-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 1rem;
}

.demographic-item h4 {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* Charts Sizing */
#ageChart, #genderChart {
    height: 180px !important;
}

/* Content Performance */
.content-performance {
    grid-column: span 2;
    background: #1e293b;
    border-radius: 12px;
    padding: 1rem;
}

.content-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.75rem;
}

.content-tab {
    font-size: 0.9rem;
    padding: 0.4rem 0.75rem;
}

.post-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.post-thumbnail img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
}

.post-caption {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.post-metrics {
    display: flex;
    gap: 1rem;
}

.post-metric {
    font-size: 0.8rem;
}

/* Updated Platform Selection Styles - MORE DRAMATIC CHANGES */
.platform-selection {
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.platform-selection h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, var(--button-blue), var(--color-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.platform-selection p {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Sleek horizontal layout for platforms */
.platform-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.platform-card {
    width: 160px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.platform-card:hover {
    transform: translateY(-10px) scale(1.05);
    border-color: var(--button-blue);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.platform-card i {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    transition: all 0.4s ease;
}

.platform-card:hover i {
    transform: scale(1.2);
}

.platform-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
    transition: color 0.3s ease;
}

.platform-connect-btn {
    background: var(--button-blue);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.9;
    transform: translateY(5px);
}

.platform-card:hover .platform-connect-btn {
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

.pinterest-btn {
    background: #E60023;
}

/* Add loading animation for the button */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.connect-button.loading {
    background-size: 200% 200%;
    animation: gradient-shift 2s ease infinite;
    pointer-events: none;
    opacity: 0.8;
}

/* Header Actions Styles */
.header-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-end;
}

.account-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.add-platform-btn {
    background: linear-gradient(45deg, var(--button-blue), var(--color-accent));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-platform-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.2);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-filter {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .account-actions {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .insights-header {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .profile-summary {
        width: 100%;
        justify-content: center;
    }
    
    .header-actions {
        width: 100%;
    }
    
    .account-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .add-platform-btn,
    .logout-btn {
        width: 100%;
        justify-content: center;
    }
} 