
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 220 25% 98%;
    --foreground: 220 10% 10%;

    --card: 0 0% 100%;
    --card-foreground: 220 10% 10%;

    --popover: 0 0% 100%;
    --popover-foreground: 220 10% 10%;

    --primary: 255 70% 60%;
    --primary-foreground: 210 40% 98%;

    --secondary: 260 60% 94%;
    --secondary-foreground: 220 10% 10%;

    --muted: 220 10% 94%;
    --muted-foreground: 220 10% 45%;

    --accent: 248 90% 66%;
    --accent-foreground: 0 0% 100%;

    --destructive: 0 84% 60%;
    --destructive-foreground: 210 40% 98%;

    --border: 220 15% 90%;
    --input: 220 15% 90%;
    --ring: 255 70% 60%;

    --radius: 1rem;

    --sidebar-background: 220 25% 98%;
    --sidebar-foreground: 220 10% 30%;
    --sidebar-primary: 255 70% 60%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 248 90% 95%;
    --sidebar-accent-foreground: 255 70% 60%;
    --sidebar-border: 220 15% 90%;
    --sidebar-ring: 255 70% 60%;
  }

  .dark {
    --background: 220 30% 10%;
    --foreground: 220 10% 95%;

    --card: 220 30% 12%;
    --card-foreground: 220 10% 95%;

    --popover: 220 30% 12%;
    --popover-foreground: 220 10% 95%;

    --primary: 255 70% 70%;
    --primary-foreground: 220 10% 5%;

    --secondary: 220 20% 20%;
    --secondary-foreground: 220 10% 95%;

    --muted: 220 20% 20%;
    --muted-foreground: 220 10% 70%;

    --accent: 248 90% 70%;
    --accent-foreground: 220 10% 5%;

    --destructive: 0 70% 50%;
    --destructive-foreground: 220 10% 95%;

    --border: 220 20% 25%;
    --input: 220 20% 20%;
    --ring: 255 70% 70%;

    --sidebar-background: 220 30% 12%;
    --sidebar-foreground: 220 10% 80%;
    --sidebar-primary: 255 70% 70%;
    --sidebar-primary-foreground: 0 0% 100%;
    --sidebar-accent: 220 20% 20%;
    --sidebar-accent-foreground: 220 10% 95%;
    --sidebar-border: 220 20% 25%;
    --sidebar-ring: 255 70% 70%;
  }
}

@layer base {
  * {
    @apply border-border;
  }

  body {
    @apply bg-background text-foreground font-montserrat;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath opacity='.5' d='M96 95h4v1h-4v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4h-9v4h-1v-4H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15v-9H0v-1h15V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h9V0h1v15h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9h4v1h-4v9zm-1 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm9-10v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-10 0v-9h-9v9h9zm-9-10h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9zm10 0h9v-9h-9v9z'/%3E%3Cpath d='M6 5V0H5v5H0v1h5v94h1V6h94V5H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  }
}

@layer components {
  .hero-gradient {
    @apply bg-gradient-to-br from-indigo-400 via-blue-500 to-purple-600;
  }

  .card-gradient {
    @apply bg-gradient-to-br from-white to-blue-50;
  }

  .card-dark-gradient {
    @apply bg-gradient-to-br from-gray-800 to-gray-900;
  }

  .btn-gradient {
    @apply bg-gradient-to-r from-blue-500 to-indigo-600 hover:from-blue-600 hover:to-indigo-700;
  }

  .glow-effect {
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.5);
  }

  .shimmer {
    @apply bg-gradient-shimmer bg-[length:200%_100%] animate-shimmer;
  }

  .cool-border {
    @apply border border-opacity-20 border-blue-300;
  }

  .cool-card {
    @apply rounded-xl bg-white bg-opacity-80 backdrop-blur-sm shadow-lg hover:shadow-xl transition-all duration-300 cool-border;
  }

  .cool-button {
    @apply rounded-lg font-medium shadow-md hover:shadow-lg transition-all transform hover:-translate-y-1;
  }

  .bg-cool-pattern {
    @apply relative overflow-hidden;
  }

  .bg-cool-pattern::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 25px 25px, rgba(255, 255, 255, 0.2) 2%, transparent 0%),
                      radial-gradient(circle at 75px 75px, rgba(255, 255, 255, 0.2) 2%, transparent 0%);
    background-size: 100px 100px;
    pointer-events: none;
    z-index: -1;
  }

  .glass-effect {
    @apply bg-white bg-opacity-10 backdrop-blur-sm border border-white border-opacity-20 shadow-lg;
  }

  /* Products Page Styles */
  .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .product-card {
    background-color: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
  }

  .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }

  .product-card.featured {
    border: 2px solid var(--primary);
    position: relative;
  }

  .product-card-header {
    padding: 1.5rem;
    background: linear-gradient(145deg, #6366f1, #8b5cf6);
    color: white;
  }

  .product-card-header .product-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .product-card-header .product-desc {
    font-size: 0.875rem;
    opacity: 0.85;
  }

  .product-card-body {
    padding: 1.5rem;
  }

  .product-info {
    margin-bottom: 1.5rem;
  }

  .product-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
  }

  .product-info-item:last-child {
    margin-bottom: 0;
  }

  .product-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .product-btn:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  }

  /* VIP Page Styles */
  .vip-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .vip-card {
    background-color: hsla(0,0%,100%,.06);
    border-radius: var(--radius);
    padding: 2rem 1.5rem !important;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
  }

  .vip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  }

  .vip-card.featured {
    border: 2px solid var(--accent);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.2);
  }

  .vip-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .vip-level {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary);
  }

  .vip-price {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
  }

  .vip-features {
    margin-bottom: 1.5rem;
  }

  .vip-feature {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .vip-upgrade-btn {
    width: 100%;
    padding: 0.75rem !important;
    background: linear-gradient(135deg, #9b87f5, #7E69AB);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 10px !important;
  }

  .vip-upgrade-btn:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  }

  .vip-upgrade-btn.featured {
    background: linear-gradient(145deg, #6366f1, #8b5cf6);
  }

  /* Profile Page Styles */
  .profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
  }

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

  .profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
  }

  .profile-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
  }

  .profile-info p {
    color: var(--muted-foreground);
  }

  .profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
  }

  .profile-stat-item {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  }

  .profile-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary);
  }

  .profile-stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
  }

  .profile-tabs {
    margin-bottom: 1.5rem;
  }

  .profile-tab-list {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
  }

  .profile-tab {
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
  }

  .profile-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -1px;
  }

  /* Transaction Records Page Styles */
  .records-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
  }

  .record-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background-color: var(--secondary);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
  }

  .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1 1 200px;
  }

  .filter-group label {
    font-weight: 500;
    font-size: 0.875rem;
  }

  .form-select {
    padding: 0.625rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card);
    color: var(--foreground);
    font-family: inherit;
    font-size: 0.95rem;
  }

  .search-btn {
    flex: 0 0 100px;
    height: 42px;
  }

  .transaction-table {
    width: 100%;
    border-collapse: collapse;
  }

  .transaction-table th,
  .transaction-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }

  .transaction-table th {
    font-weight: 600;
    background-color: var(--secondary);
    color: var(--foreground);
  }

  .status-pill {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .status-pill.completed {
    background-color: rgba(16, 185, 129, 0.1);
    color: rgb(16, 185, 129);
  }

  .status-pill.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: rgb(245, 158, 11);
  }

  .status-pill.failed {
    background-color: rgba(239, 68, 68, 0.1);
    color: rgb(239, 68, 68);
  }

  .action-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
  }

  .action-btn:hover {
    background-color: var(--accent);
  }

  .pagination-container {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
  }

  .pagination-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--card);
    cursor: pointer;
    transition: all 0.2s;
  }

  .pagination-btn:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .pagination-btn.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
  }

  .pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

  .pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
  }

  /* Transaction Modal */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
  }

  .modal-content {
    background-color: var(--card);
    border-radius: var(--radius);
    padding: 0px !important;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  }

  .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted-foreground);
    transition: color 0.2s;
  }

  .modal-close:hover {
    color: var(--foreground);
  }

  .transaction-detail-item {
    display: flex;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
  }

  .transaction-detail-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
  }

  .detail-label {
    width: 150px;
    font-weight: 500;
    flex-shrink: 0;
  }

  .detail-value {
    flex-grow: 1;
  }

  .break-words {
    word-break: break-all;
  }
}
