* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #0f1419;
    min-height: 100vh;
    color: #ffffff;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background: #1e2328;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    border-right: 1px solid #3c4043;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-icon {
    width: 100%;
    height: 50px;
    margin: 5px 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #8b9dc3;
    padding: 0 15px;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.sidebar-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.sidebar-icon:hover::before {
    left: 100%;
}

.sidebar-icon:hover {
    background: linear-gradient(135deg, #2a2d35 0%, #3c4043 100%);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(255, 70, 85, 0.2);
}

.sidebar-icon.active {
    background: linear-gradient(135deg, #ff4655 0%, #e63946 100%);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 70, 85, 0.4);
    transform: translateX(5px);
}

.sidebar-text {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.main-content {
    flex: 1;
    background: #0f1419;
    display: flex;
    flex-direction: column;
    margin-left: 200px;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

.header {
    background: #1e2328;
    padding: 25px 30px;
    border-bottom: 1px solid #2a2d35;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 200px;
    right: 0;
    z-index: 200;
}

.header-left h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.configure-btn {
    background: #2a2d35;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.configure-btn:hover {
    background: #3c4043;
    transform: translateY(-2px);
}

.riot-signin-btn {
    background: #ff4655;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.riot-signin-btn:hover {
    background: #e63946;
    transform: translateY(-2px);
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
}

.api-config {
    background: #1e2328;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #2a2d35;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: end;
}

.config-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.config-section label {
    font-weight: 600;
    color: #8b9dc3;
    font-size: 0.9rem;
}

.config-section input,
.config-section select {
    padding: 12px;
    background: #2a2d35;
    border: 1px solid #3c4043;
    border-radius: 8px;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.config-section input:focus,
.config-section select:focus {
    outline: none;
    border-color: #ff4655;
    box-shadow: 0 0 0 2px rgba(255, 70, 85, 0.2);
}

.config-section input::placeholder {
    color: #8b9dc3;
}

.config-section button {
    padding: 12px 20px;
    background: #ff4655;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.config-section button:hover {
    background: #e63946;
    transform: translateY(-1px);
}

.search-section {
    background: #1e2328;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #2a2d35;
}

.search-box {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box input {
    flex: 1;
    min-width: 300px;
    padding: 15px;
    background: #2a2d35;
    border: 1px solid #3c4043;
    border-radius: 10px;
    font-size: 1rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ff4655;
    box-shadow: 0 0 0 2px rgba(255, 70, 85, 0.2);
}

.search-box input::placeholder {
    color: #8b9dc3;
}

.search-box button {
    padding: 15px 25px;
    background: #ff4655;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-box button:hover {
    background: #e63946;
    transform: translateY(-1px);
}

.tabs {
    display: flex;
    background: #1e2328;
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 25px;
    border: 1px solid #2a2d35;
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    padding: 15px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 120px;
    color: #8b9dc3;
}

.tab-button.active {
    background: #ff4655;
    color: white;
}

.tab-button:hover:not(.active) {
    background: #2a2d35;
    color: #ffffff;
}

.content {
    background: #1e2328;
    border-radius: 12px;
    padding: 30px;
    border: 1px solid #2a2d35;
    min-height: 400px;
}

.tab-content {
    display: none;
    flex: 1;
    height: 100%;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

.tab-content h2 {
    margin-bottom: 25px;
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 600;
}

.dashboard-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
}

.overview-card {
    background: #2a2d35;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #3c4043;
    transition: all 0.3s ease;
    height: fit-content;
}

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: #ff4655;
}

.overview-card h3 {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.overview-card p {
    color: #8b9dc3;
    font-size: 0.9rem;
    line-height: 1.4;
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    flex: 1;
    overflow-y: auto;
}

.data-card {
    background: #2a2d35;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #3c4043;
}

.data-card:hover {
    transform: translateY(-2px);
    border-color: #ff4655;
    box-shadow: 0 4px 20px rgba(255, 70, 85, 0.2);
}

.agent-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.agent-card:hover {
    transform: translateY(-4px);
    border-color: #ff4655;
    box-shadow: 0 8px 25px rgba(255, 70, 85, 0.3);
}

.click-hint {
    color: #ff4655;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
    text-align: center;
    opacity: 0.8;
}

.data-card h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.data-card p {
    color: #8b9dc3;
    line-height: 1.5;
    margin-bottom: 8px;
}

.data-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #8b9dc3;
    font-size: 1.1rem;
}

.error-message {
    background: #ff4655;
    color: white;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    font-weight: 500;
}

.player-info {
    background: #2a2d35;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid #3c4043;
    margin-bottom: 20px;
}

.player-info h3 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.player-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.stat-item {
    background: #1e2328;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #3c4043;
}

.stat-item .stat-label {
    font-size: 0.9rem;
    color: #8b9dc3;
    margin-bottom: 5px;
}

.stat-item .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: #1e2328;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #2a2d35;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
    background: #2a2d35;
    padding: 20px 30px;
    border-bottom: 1px solid #3c4043;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
}

.modal-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 1.5rem;
}

.close {
    color: #8b9dc3;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff4655;
}

.modal-body {
    padding: 30px;
}

.agent-role, .agent-description {
    margin-bottom: 20px;
    color: #8b9dc3;
}

.agent-role strong, .agent-description strong {
    color: #ffffff;
}

.abilities-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.abilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.ability-card {
    background: #2a2d35;
    border: 1px solid #3c4043;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.ability-card:hover {
    border-color: #ff4655;
    transform: translateY(-2px);
}

.ability-card h4 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.ability-card p {
    color: #8b9dc3;
    line-height: 1.5;
    margin: 0;
}

.ability-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Widget Configuration Styles */
.widget-config {
    padding: 20px 0;
}

.widget-config h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.url-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.url-display input {
    flex: 1;
    padding: 12px;
    background: #2a2d35;
    border: 1px solid #3c4043;
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.copy-btn {
    background: #ff4655;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    background: #e63946;
}

.widget-actions {
    margin-bottom: 30px;
}

.regenerate-btn {
    background: #2a2d35;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.regenerate-btn:hover {
    background: #3c4043;
}

.widget-instructions {
    background: #2a2d35;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #3c4043;
}

.widget-instructions h4 {
    color: #ffffff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.widget-instructions ol {
    color: #8b9dc3;
    line-height: 1.6;
    margin: 0;
    padding-left: 20px;
}

.widget-instructions li {
    margin-bottom: 8px;
}

/* Sign In Styles */
.sign-in-section {
    background: #2a2d35;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    border: 1px solid #3c4043;
    text-align: center;
}

.sign-in-section h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.sign-in-section p {
    color: #8b9dc3;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.riot-signin-btn {
    background: #ff4655;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 200px;
}

.riot-signin-btn:hover {
    background: #e63946;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 70, 85, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #1e2328;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #3c4043;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ff4655;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    flex: 1;
    text-align: left;
}

.user-details h4 {
    color: #ffffff;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.user-details p {
    color: #8b9dc3;
    margin: 0 0 10px 0;
    font-size: 0.9rem;
}

.sign-out-btn {
    background: #3c4043;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sign-out-btn:hover {
    background: #ff4655;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .sidebar {
        width: 60px;
        position: fixed;
        left: 0;
        top: 0;
        z-index: 1000;
    }
    
    .sidebar-text {
        display: none;
    }
    
    .sidebar-icon {
        justify-content: center;
        padding: 0;
        gap: 0;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .api-config {
        flex-direction: column;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input {
        min-width: 100%;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .data-grid {
        grid-template-columns: 1fr;
    }
}
