:root {
    --primary-gradient: linear-gradient(135deg, #6e8efb, #a777e3);
    --secondary-gradient: linear-gradient(135deg, #fc5c7d, #6a82fb);
    --success-gradient: linear-gradient(135deg, #0ba360, #3cba92);
    --accent-color: #ff7b54;
    --text-color: #2c3e50;
    --light-text: #f8f9fa;
    --dark-bg: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }
  
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }
  
  body {
    min-height: 100vh;
    background-image: var(--primary-gradient);
    background-size: 400%;
    animation: bg-animation 15s infinite alternate;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    color: var(--text-color);
    overflow-x: hidden;
  }
  
  @keyframes bg-animation {
    0% {
      background-position: left;
    }
    100% {
      background-position: right;
    }
  }
  
  .container {
    width: 100%;
    max-width: 800px;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 2rem;
    transform: translateY(0);
    transition: var(--transition);
  }
  
  .container:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  }
  
  h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
  }
  
  h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: var(--secondary-gradient);
    border-radius: 10px;
  }
  
  .input-container {
    position: relative;
    margin-bottom: 1.5rem;
  }
  
  .input-container svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-color);
    transition: var(--transition);
  }
  
  .text-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    transition: var(--transition);
  }
  
  .text-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 130, 251, 0.3);
  }
  
  .text-input:focus + svg {
    transform: translateY(-50%) scale(1.1);
  }
  
  .buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }
  
  .transform-btn {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 10px;
    background: var(--primary-gradient);
    color: var(--light-text);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }
  
  .transform-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.15);
  }
  
  .transform-btn:active {
    transform: translateY(0);
  }
  
  .transform-btn svg {
    font-size: 16px;
  }
  
  .transform-btn.uppercase {
    background: linear-gradient(135deg, #4776E6, #8E54E9);
  }
  
  .transform-btn.lowercase {
    background: linear-gradient(135deg, #11998e, #38ef7d);
  }
  
  .transform-btn.capitalize {
    background: linear-gradient(135deg, #FF8008, #FFC837);
  }
  
  .transform-btn.reverse {
    background: linear-gradient(135deg, #834d9b, #d04ed6);
  }
  
  .transform-btn.trim {
    background: linear-gradient(135deg, #1e3c72, #2a5298);
  }
  
  .transform-btn.character-count {
    background: linear-gradient(135deg, #f12711, #f5af19);
  }
  
  .result-container {
    background: var(--dark-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
    position: relative;
    overflow: hidden;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .result-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
      transparent, 
      rgba(106, 130, 251, 0.1), 
      transparent 30%
    );
    animation: rotate 4s linear infinite;
    z-index: 0;
  }
  
  @keyframes rotate {
    100% {
      transform: rotate(1turn);
    }
  }
  
  .result-text {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
  }
  
  .copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2;
  }
  
  .copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
  }
  
  .copy-btn svg {
    color: var(--light-text);
    font-size: 18px;
  }
  
  .info-box {
    background: rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--accent-color);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    line-height: 1.5;
  }
  
  .info-box strong {
    color: var(--accent-color);
  }
  
  .stats {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
  }
  
  .stat-item {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
  }
  
  .stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 10px rgba(0, 0, 0, 0.1);
  }
  
  .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  
  .stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
  }
  
  /* Custom scrollbar */
  ::-webkit-scrollbar {
    width: 8px;
  }
  
  ::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
  }
  
  ::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 10px;
  }
  
  /* Animations for elements */
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  .container > * {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
  }
  
  .container > *:nth-child(1) { animation-delay: 0.1s; }
  .container > *:nth-child(2) { animation-delay: 0.2s; }
  .container > *:nth-child(3) { animation-delay: 0.3s; }
  .container > *:nth-child(4) { animation-delay: 0.4s; }
  .container > *:nth-child(5) { animation-delay: 0.5s; }
  .container > *:nth-child(6) { animation-delay: 0.6s; }
  
  /* Copy animation */
  @keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
  }
  
  .copy-animation {
    animation: copySuccess 0.5s ease-out;
  }
  
  /* Responsive styles */
  @media (max-width: 768px) {
    body {
      padding: 1rem;
    }
    
    .container {
      padding: 1.5rem;
    }
    
    h1 {
      font-size: 2rem;
    }
    
    .buttons-container {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .stats {
      flex-direction: column;
      gap: 0.5rem;
    }
  }
  
  /* Additional hover effects */
  .result-container:hover::before {
    animation-duration: 2s;
  }
  
  .text-input:hover {
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  }
  
  /* Focus state for buttons */
  .transform-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3), 0 7px 10px rgba(0, 0, 0, 0.15);
  }
  
  /* More sophisticated animations */
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(106, 130, 251, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(106, 130, 251, 0); }
    100% { box-shadow: 0 0 0 0 rgba(106, 130, 251, 0); }
  }
  
  .copy-btn:active {
    animation: pulse 0.8s ease-out;
  }