/* Royality Devs - Custom Styles */

:root {
    --primary-color: #5865F2;
    --secondary-color: #2C2F33;
    --accent-color: #FFD700;
    --text-light: #FFFFFF;
    --text-dark: #2C2F33;
    --bg-dark: #1A1A1A;
    --bg-light: #F8F9FA;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

/* Navigation */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar-scrolled {
    background-color: rgba(26, 26, 26, 0.95) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color));
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::before {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

/* Hero Sections */
.hero-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    animation: float 6s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(88, 101, 242, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(88, 101, 242, 0.05) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
}

.hero-image i {
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
}

.hero-buttons .btn {
    position: relative;
    overflow: hidden;
}

.hero-buttons .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.5s;
}

.hero-buttons .btn:hover::before {
    left: 100%;
}

.discord-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7289DA 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.about-hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--bg-dark) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.contact-hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-section {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--secondary-color) 100%);
    min-height: 80vh;
    display: flex;
    align-items: center;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-warning {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

.btn-warning:hover {
    background-color: #FFC107;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #4752C4;
    border-color: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: var(--accent-color);
}

/* Cards */
.card {
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(255, 215, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.card:hover::before {
    opacity: 1;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 20px rgba(88, 101, 242, 0.3);
}

.card-body {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.card-title {
    transition: color 0.3s ease;
}

.card:hover .card-title {
    color: var(--primary-color);
}

/* Feature Icons */
.feature-icon {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    z-index: -1;
}

.feature-icon:hover::before {
    width: 120px;
    height: 120px;
}

.feature-icon:hover {
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 20px rgba(88, 101, 242, 0.5));
}

.feature-icon i {
    transition: all 0.3s ease;
}

.feature-icon:hover i {
    color: var(--primary-color) !important;
    text-shadow: 0 0 10px currentColor;
}

/* Stats Section */
.stat-item {
    padding: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(88, 101, 242, 0.1), rgba(255, 215, 0, 0.1));
    border-radius: 15px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-item:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(88, 101, 242, 0.4);
}

.stat-item i {
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

.stat-item:hover i {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.8));
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.stat-item:hover h3 {
    transform: scale(1.1);
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
}

/* Discord Widget */
.discord-widget {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.discord-widget iframe {
    border-radius: 12px;
}

/* Bot Avatars */
.bot-avatar {
    transition: transform 0.3s ease;
}

.bot-avatar:hover {
    transform: scale(1.1);
}

/* Team Avatars */
.team-avatar {
    transition: transform 0.3s ease;
}

.team-avatar:hover {
    transform: scale(1.05);
}

/* Value Icons */
.value-icon {
    transition: transform 0.3s ease;
}

.value-icon:hover {
    transform: scale(1.1);
}

/* Contact Icons */
.contact-icon {
    transition: transform 0.3s ease;
}

.contact-icon:hover {
    transform: scale(1.1);
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #E9ECEF;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(88, 101, 242, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

/* Accordion */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.accordion-button {
    background-color: white;
    border: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-body {
    padding: 1.5rem;
    background-color: #F8F9FA;
}

/* Social Links */
.social-links a {
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

/* Footer */
footer {
    margin-top: auto;
}

/* Advanced Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(88, 101, 242, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(88, 101, 242, 0.8), 0 0 30px rgba(88, 101, 242, 0.6);
    }
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: var(--accent-color);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Animation Classes */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

.fade-in-scale {
    animation: fadeInScale 0.6s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.8s ease-out;
}

.bounce-in {
    animation: bounceIn 0.8s ease-out;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

.glow-animation {
    animation: glow 2s ease-in-out infinite;
}

.gradient-shift {
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Typing Animation */
.typing-animation {
    overflow: hidden;
    border-right: 2px solid var(--accent-color);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

/* Page Load Animation */
.page-load {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.page-loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation */
.stagger-animation > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.stagger-animation.animate > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation.animate > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation.animate > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation.animate > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation.animate > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation.animate > *:nth-child(6) { animation-delay: 0.6s; }

.stagger-animation.animate > * {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback for stagger animation - show elements after 2 seconds if JS doesn't work */
.stagger-animation:not(.animate) > * {
    animation: fadeInUp 0.6s ease-out 2s forwards;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4752C4;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--accent-color)) 1;
}
